diff options
| author | Vito Caputo <vcaputo@pengaru.com> | 2026-09-17 03:31:08 -0700 |
|---|---|---|
| committer | Vito Caputo <vcaputo@pengaru.com> | 2026-09-17 03:31:08 -0700 |
| commit | 49d20e4280d8aa6a9b719211a061394fc72d1cf5 (patch) | |
| tree | 0da5a5d5916af8935790330f48e552026e58fe03 | |
| parent | f2e46a34323ee2b9c2b8d9f03b8840fa339ff14a (diff) | |
This bug was introduced when 85547b0 added --reaper support.
When the waitpid() loop ends with an ECHILD error it shouldn't be a
problem, since this loop is intended to consume all eligible children in
a batch and may under normal conditions exhaust children. That
shouldn't prevent honoring things like --linger, which the existing code
interfered with by assigning to vmon->done in the waitpid() error path.
Just make the error branch that sets vmon->done conditional on errno !=
ECHILD, treating that as normal.
| -rw-r--r-- | src/vmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1047,7 +1047,7 @@ int main(int argc, const char * const *argv) } } - if (reaped < 0) { + if (reaped < 0 && errno != ECHILD) { VWM_ERROR("failed to waitpid on SIGCHLD: %s", strerror(errno)); vmon->done = 1; } |
