]> git.ozlabs.org Git - ppp.git/commit
Fix snafu in run_program(). Patch from Robert Vogelgesang.
authorPaul Mackerras <paulus@samba.org>
Sun, 4 Jun 2006 03:52:50 +0000 (03:52 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 4 Jun 2006 03:52:50 +0000 (03:52 +0000)
commitd929a8d4e1d3e5ff15068ea3b538598b6d448943
treeff466db52863adccc6e2f8815a2664b616b3cb4c
parentd6e4ac0c098b02de9cc7907133d209da1bbf99df
Fix snafu in run_program().  Patch from Robert Vogelgesang.

This patch splits out the major part of reap_kids() into a new
function, forget_child(), and calls this new function instead of
reap_kids() in run_program(), after having waitpid()'ed for a child.

Rationale:
The waitpid() at the start of reap_kids() has no chance to get the
PID of the child already waited for in run_program().
As a consequence, the PID of that child will stay in the list of all
children until the end of the pppd process, which is bad, because
pppd will then try to kill -TERM that PID (and might kill some
innocent third party at this point).
pppd/main.c