remove setsid check, we require a POSIX system
This commit is contained in:
@@ -421,9 +421,6 @@
|
||||
/* Define to 1 if you have the `setrlimit64' function. */
|
||||
#undef HAVE_SETRLIMIT64
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#undef HAVE_SETSID
|
||||
|
||||
/* Define to 1 if you have the `set_auth_parameters' function. */
|
||||
#undef HAVE_SET_AUTH_PARAMETERS
|
||||
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -14571,7 +14571,7 @@ LIBS=$ac_save_LIBS
|
||||
|
||||
for ac_func in strchr strrchr memchr memcpy memset sysconf tzset \
|
||||
strftime setrlimit initgroups fstat gettimeofday \
|
||||
regcomp setlocale getaddrinfo setsid setenv vhangup \
|
||||
regcomp setlocale getaddrinfo setenv vhangup \
|
||||
mbr_check_membership setrlimit64
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
|
@@ -1914,7 +1914,7 @@ dnl
|
||||
AC_FUNC_GETGROUPS
|
||||
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \
|
||||
strftime setrlimit initgroups fstat gettimeofday \
|
||||
regcomp setlocale getaddrinfo setsid setenv vhangup \
|
||||
regcomp setlocale getaddrinfo setenv vhangup \
|
||||
mbr_check_membership setrlimit64)
|
||||
AC_CHECK_FUNCS(getline, [], [
|
||||
AC_LIBOBJ(getline)
|
||||
|
@@ -451,18 +451,8 @@ send_mail(const char *fmt, ...)
|
||||
}
|
||||
|
||||
/* Daemonize - disassociate from session/tty. */
|
||||
#ifdef HAVE_SETSID
|
||||
if (setsid() == -1)
|
||||
warning("setsid");
|
||||
#else
|
||||
setpgrp(0, 0);
|
||||
# ifdef TIOCNOTTY
|
||||
if ((fd = open(_PATH_TTY, O_RDWR, 0644)) != -1) {
|
||||
ioctl(fd, TIOCNOTTY, NULL);
|
||||
close(fd);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
(void) chdir("/");
|
||||
if ((fd = open(_PATH_DEVNULL, O_RDWR, 0644)) != -1) {
|
||||
(void) dup2(fd, STDIN_FILENO);
|
||||
|
@@ -835,23 +835,10 @@ exec_monitor(struct command_details *details, char *argv[], char *envp[],
|
||||
* and the slave pty as the controlling terminal.
|
||||
* This allows us to be notified when the child has been suspended.
|
||||
*/
|
||||
#ifdef HAVE_SETSID
|
||||
if (setsid() == -1) {
|
||||
warning("setsid");
|
||||
goto bad;
|
||||
}
|
||||
#else
|
||||
# ifdef TIOCNOTTY
|
||||
n = open(_PATH_TTY, O_RDWR|O_NOCTTY);
|
||||
if (n >= 0) {
|
||||
/* Disconnect from old controlling tty. */
|
||||
if (ioctl(n, TIOCNOTTY, NULL) == -1)
|
||||
warning("cannot disconnect controlling tty");
|
||||
close(n);
|
||||
}
|
||||
# endif
|
||||
setpgrp(0, 0);
|
||||
#endif
|
||||
if (io_fds[SFD_SLAVE] != -1) {
|
||||
#ifdef TIOCSCTTY
|
||||
if (ioctl(io_fds[SFD_SLAVE], TIOCSCTTY, NULL) != 0)
|
||||
|
Reference in New Issue
Block a user