Description: |
simplest test script:
close stdin; close stdout; exec true
Workaround (assuming that original stdin & -out just need to be closed):
close stdin; close stdout; open /dev/null r; exec true
In either case: exec first creates a pipe, and while the child runs,
the parent waits on that pipe for EOF (probably to be initiated
from another thread).
With at least one of stdin or stdout NOT closed (or re-opened afterwards),
the EOF on that pipe is seen, but with BOTH stdin/-out closed, nothing
ever closes the write-end of the pipe.
PS: that pipe is NOT the one by which the main process communicates to the child.
|