summaryrefslogtreecommitdiff
path: root/selftest/knownfail.d
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2017-09-11 10:25:49 +1200
committerRalph Boehme <slow@samba.org>2017-09-16 19:53:23 +0200
commitf6a40ff2a1c133b6c30cf3ce29d7bb3ea005e3c8 (patch)
tree7ff3c1ceed2ad452ae9929c52f27cd4b4d8f5f68 /selftest/knownfail.d
parent28edf7012b5fa474897055c8c1a4c438c69b8323 (diff)
downloadsamba-f6a40ff2a1c133b6c30cf3ce29d7bb3ea005e3c8.tar.gz
util/tfork: Write to the status pipe
The previous design relied on only calling close() of the status pipe. We now write a single 0 byte to the status FD as well as closing it in the parent process. Both of these operations typically trigger a read event on the other end of the FD, held in the waiter process (the child). The child process blocks on the status FD, until it becomes readable. However if there is a sibling process that was launched after the waiter process they also will hold the status FD open and the status FD would, until this change, never become readable to the waiter process (the child). This caused the waiter process (child) not to exit and the parent process to hang in tfork_status() while expecting the waitpid() to return. That is, file descriptors are essentially global variables copied to children in the process tree. The last child that (unwittingly) holds the file descriptor open is the one that needs to trigger the close() this code previously depended on. Without this change, there is no notification of process death until all these unrelated children exit for their own reasons. We can write up to 4K (PIPE_BUF) into this pipe before blocking, but we only write one byte. Additionally sys_write() refuses to block. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'selftest/knownfail.d')
0 files changed, 0 insertions, 0 deletions