Mario Oshogbo <[email protected]> wrote in <[email protected]>:
os> Thank you for your commit and sorry for not repair this problem earlier.
os>
os> > @@ -274,6 +274,15 @@ main(int argc, char *argv[])
os> > exit(1);
os> > if (!quiet_mode) {
os> > pid_child_receiver = pdfork(&fdp, 0);
os> > + if (pid_child_receiver == -1) {
os> > + if (errno != ENOSYS) {
os> > + syslog(LOG_ERR, "pdfork: %m");
os> > + exit(1);
os> > + } else {
os> > + pid_child_receiver = fork();
os> > + fdp = -1;
os> > + }
os> > + }
os>
os> We can't do it this way. pdfork() is used there to prevent killing only
os> one process. If we use fork() and we kill parent process the second
os> process (child process) will become a zombie process. I suggest to
os> revert this change. The changes that Pawel commit (r254486 (thx
os> jilles!!!) and r254480) should resolve all problems.
When the parent process is killed, the child process will be an child
process of init, not a zombie, and init calls waitpid() when it
terminates (by SIGTERM, for example). I agree that this should be
improved, but I do not think removing fallback to fork(2) is a good
idea if PROCDESC is still a kernel option. Reverting will not solve
the problem that it does not work with a kernel without PROCDESC.
-- Hiroki
pgpVDLkXNlIMu.pgp
Description: PGP signature
