[PATCH] s3: increase the log level for missing PIDs on SIGCHLD

Andrew Bartlett abartlet at samba.org
Wed Feb 16 14:08:04 MST 2011

On Wed, 2011-02-16 at 17:23 +0100, David Disseldorp wrote:
> Since the fix for bso#7836, the parent smbd is responsible for
> maintaining an up-to-date printcap cache. It does this by forking a
> child process to asynchronously fetch printcap data from CUPS.
> When the child process exits after fetching all printcap data, the
> parent smbd is sent SIGCHLD. This triggers smbd_sig_chld_handler() which
> looks for the exited process PID on a "children" list.
> Child smbd process PIDs are added to the "children" list to ensure
> cleanup on unclean shutdown and log level change notification messages.
> Printcap update process PIDs are not added to the list as they do not
> maintain any state that requires cleanup, nor do they wait on tevent for
> messages.

If they are not added to the list, and so this will trigger every time,
then we should simply not emit this message at all, or at level 10, not
1 (the default). 

> -	DEBUG(0, ("Could not find child %d -- ignoring\n", (int)pid));
> +	/* not all forked child processes are added to the children list */
> +	DEBUG(1, ("Could not find child %d -- ignoring\n", (int)pid));
>  }
>  /****************************************************************************

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.

More information about the samba-technical mailing list