diff options
author | Thomas Pfaff <tpfaff@gmx.net> | 2010-12-03 14:01:28 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2010-12-03 14:01:28 -0600 |
commit | 062223a5df25a3b6f4d6c99580851e7daef70e8a (patch) | |
tree | c08c00f3a815e3d9a0ded2b78a7a2f05d5e02dcb /doc | |
parent | 18064e19f6286595b81ef456dd23f453ff50dd5e (diff) |
Avoid race condition in runscript (bug #319865)
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.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions