diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 07:41:31 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-01 07:41:31 +0000 |
| commit | bae3244ec6344bf0d28a01fa06895b9ad2d6c293 (patch) | |
| tree | 8538a46b114c7d5b19afc8e19b99b02482685cb1 /input.c | |
| parent | slave: use an event FD to communicate errors after fork before exec (diff) | |
Revert "slave: use an event FD to communicate errors after fork before exec"
This reverts commit 027a8de6f547115fd90b8ee612fc616b61d5000c.
I was a bit quick on this one, and only tested error cases. Turns out,
this causes foot to hang in a blocking read(3) on the event FD.
This is because while the FD has FD_CLOEXEC, that flag is per file
descriptor. I.e. the forked copy of the event fd is closed when we
exec(), but since this isn't a pipe, nothing is signaled to the parent
process, which thus remains blocking in read(3) since its copy of the
event fd hasn't been closed.
We _could_ write a dummy value on the event fd just before exec(), but
then we wouldn't be able to catch errors from exec() self - only
errors *before* exec().
Diffstat (limited to 'input.c')
0 files changed, 0 insertions, 0 deletions
