Close() in daemon loop

From: Robert Collins <robert.collins@dont-contact.us>
Date: Fri, 7 Jul 2000 08:20:52 +1000

In watch_child(), just before it launches the very first daemon, squid goes
thru the following loop

    for (i = 0; i < Squid_MaxFD; i++)
        close(i);

    for (;;) {
        mainStartScript(argv[0]);
        if ((pid = fork()) == 0) {
            /* child */

Is there any design reason that squid can't check to see if it is open
before calling close()?
The reason for asking is a problem on cygwin (1.1.3s) where it's
stackdumping when i=2. I'm following up the stackdump with the cygwin
developers.

TIA
Rob
Received on Thu Jul 06 2000 - 16:16:25 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:31 MST