062223a5df
Under normal conditions, runscript creates one child and waits for its termination, which is signaled by a pipe write from the SIGCHLD sighandler. When running killprocs however more than one SIGHCLD signal is generated, at least on all of my amd64 boxes running on real hardware and in vmware. When the first SIGCHLD occurs svc_exec leaves the loop and closes the pipe. Subsequent SIGCHLDs during the close can lead to a race condition and create an EBADF error in the pipe write (pipe is closed but the file handle is still != -1). We avoid this by blocking SIGHCHLD during the pipe close. |
||
---|---|---|
.. | ||
_usage.c | ||
_usage.h | ||
.gitignore | ||
builtins.h | ||
checkpath.c | ||
fstabinfo.c | ||
Makefile | ||
mountinfo.c | ||
rc-applets.c | ||
rc-depend.c | ||
rc-logger.c | ||
rc-logger.h | ||
rc-misc.c | ||
rc-plugin.c | ||
rc-plugin.h | ||
rc-service.c | ||
rc-status.c | ||
rc-update.c | ||
rc.c | ||
runscript.c | ||
start-stop-daemon.c | ||
start-stop-daemon.pam | ||
swclock.c |