Overview
| Artifact ID: | b183dfce903b032fced6d45c5250fe2f1b6d1592c690229554a1e00ab70ad4fb |
|---|---|
| Ticket: | 21dbc600ae0a005a7f879a05580550a8da257b14
exec hangs, iff stdin & stdout both were previously closed. |
| User & Date: | avl42 on 2022-12-06 11:56:25 |
Changes
- comment changed to:
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 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.
- login: "avl42"
- mimetype: "text/plain"