Fix a small bug with the code that closes all file descriptors when the PBS server starts. Although this fix would be obvious, it exposes some other bugs that depend on it being broken. Instead just comment out the code and add a warning comment. --- pbs-2.3.12-pw/src/server/pbsd_init.c | 9 +++++++++ 1 files changed, 9 insertions(+) diff -puN src/server/pbsd_init.c~server-fd-close src/server/pbsd_init.c --- pbs-2.3.12/src/server/pbsd_init.c~server-fd-close 2004-04-17 11:22:26.000000000 -0400 +++ pbs-2.3.12-pw/src/server/pbsd_init.c 2004-04-17 11:23:04.000000000 -0400 @@ -235,9 +235,18 @@ int pbsd_init(type) return (-1); i = getgid(); (void)setgroups(1, (gid_t *)&i); /* secure suppl. groups */ +#if 0 i = sysconf(_SC_OPEN_MAX); + /* + * Yes, this is a bug, but it hides another bug. If you change + * the comparison to ">" like it shoud be, you will find that the + * server has no log file or lock file. And in fact this is rather + * silly. Let's just trust that root uses the correct startup script + * which does not leave any open fds around. + */ while (--i < 2) (void)close(i); /* close any file desc left open by parent */ +#endif #ifndef DEBUG #ifdef _CRAY _