clone 609780 -1 retitle -1 cron: messages are logged with wrong PID thanks On 06/14/2011 01:01 AM, Christian Kastner wrote: > I noticed by coincidence that this is not entirely fixed, therefore > reopening. > > When running cron with the process debugging code on, it works as > expected. In regular mode, however, does not: the reported start pid is > that of the parent process instead of the child process.
The reason for this is a subtle but serious bug in the logging function,
void log_it(char *username, int xpid, char *event, char *detail)
namely that the implementation simply ignores the PID value passed as
the second argument. The actual output in the logfile is simply the PID
of the child when openlog() was called. The bug did not manifest itself
in debug mode because it prints the function arguments as they were passed.
I'm cloning this bug because I'm not sure if it is fixable in general.
The start/stop PID, however, certainly is, so it should be tracked
separately.
signature.asc
Description: OpenPGP digital signature

