diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-08-21 10:56:02 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-08-21 10:56:02 +0800 |
commit | f35c59f6a97612b6b02dca7f1795c857440c2ae3 (patch) | |
tree | 2341284ac4f6a9f629777058b2ce0f3763781a56 /common/sys/daemon.c | |
parent | f0d5926be992b6a79a59505f7c4ab23180fb42bd (diff) | |
download | pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar.gz pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar.bz2 pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar.lz pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar.xz pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.tar.zst pttbbs-f35c59f6a97612b6b02dca7f1795c857440c2ae3.zip |
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
Diffstat (limited to 'common/sys/daemon.c')
-rw-r--r-- | common/sys/daemon.c | 2 |
1 files changed, 2 insertions, 0 deletions
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"); |