diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-27 12:32:31 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-27 12:32:31 +0200 |
commit | 33ae34357f371f45ecb5f988bcdd961372130565 (patch) | |
tree | 0c73ae588957961133af4c73420fd89bfdd2eff4 /sfeed_twtxt.1 | |
parent | db1dcafd03997127f2cbc82376e2cc8df9b77356 (diff) |
sfeed_curses: avoid non-interactive plumb process becoming a zombie
From POSIX:
Consequences of Process Termination:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/_Exit.html#tag_16_01_03_01
"
[XSI] [Option Start] If the parent process of the calling process has set its
SA_NOCLDWAIT flag or has set the action for the SIGCHLD signal to SIG_IGN:
The process' status information (see Status Information), if any, shall be
discarded.
The lifetime of the calling process shall end immediately. If SA_NOCLDWAIT is
set, it is implementation-defined whether a SIGCHLD signal is sent to the
parent process.
If a thread in the parent process of the calling process is blocked in wait(),
waitpid(), or waitid(), and the parent process has no remaining child processes
in the set of waited-for children, the wait(), waitid(), or waitpid() function
shall fail and set errno to [ECHILD].
"
Noticed on Linux (but not on OpenBSD).
To reproduce:
- SFEED_PLUMBER_INTERACTIVE=0 SFEED_PLUMBER="less" sfeed_curses ~/.sfeed/feeds/*
- Then open and close the child program.
- Notice it becoming a zombie or "<defunct>" in the process table.
Diffstat (limited to 'sfeed_twtxt.1')
0 files changed, 0 insertions, 0 deletions