Index: ossp-pkg/lmtp2nntp/daemon.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/daemon.c,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/daemon.c,v' 2>/dev/null --- daemon.c 2001/10/04 10:57:22 1.1 +++ daemon.c 2001/10/04 11:00:38 1.2 @@ -14,7 +14,7 @@ #include "daemon.h" -int daemonize(int nochdir, int noclose) +int daemonize(void) { int fd; int rc; @@ -23,10 +23,8 @@ * if we are started from init, * no need to become daemon. */ -#if 0 if (getppid() == 1) return; -#endif /* * Ignore tty related signals @@ -94,8 +92,7 @@ * [Equivalently, we could change to any directory containing files * important to the daemon's operation.] */ - if (!nochdir) - chdir("/"); + chdir("/"); /* * give us complete control over the permissions of anything we write. We @@ -108,7 +105,7 @@ * inherited from our parent process. We have no way of knowing where * these fds might have been redirected to. */ - if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) { + if ((fd = open("/dev/null", O_RDWR, 0)) != -1) { dup2(fd, STDIN_FILENO); dup2(fd, STDOUT_FILENO); dup2(fd, STDERR_FILENO); Index: ossp-pkg/lmtp2nntp/daemon.h RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/daemon.h,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/daemon.h,v' 2>/dev/null --- daemon.h 2001/10/04 10:57:22 1.1 +++ daemon.h 2001/10/04 11:00:38 1.2 @@ -1,6 +1,6 @@ #ifndef _DAEMON_H_ #define _DAEMON_H_ -int daemonize(int, int); +int daemonize(void); #endif /* _DAEMON_H_ */