From f35c59f6a97612b6b02dca7f1795c857440c2ae3 Mon Sep 17 00:00:00 2001 From: wens Date: Thu, 21 Aug 2008 02:56:02 +0000 Subject: Don't close all fds, do it in daemon for more flexibility git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4401 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- common/sys/daemon.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/sys') diff --git a/common/sys/daemon.c b/common/sys/daemon.c index 829d0a9c..4d925c1c 100644 --- a/common/sys/daemon.c +++ b/common/sys/daemon.c @@ -66,9 +66,11 @@ daemonize(const char * pidfile, const char * logfile) } } +#if 0 fd = getdtablesize(); while (fd > 2) close(--fd); +#endif if ((fd = open("/dev/null", O_RDWR)) < 0) { perror("Can't open /dev/null"); -- cgit v1.2.3