Skip to content
Snippets Groups Projects
Commit 53c3f702 authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-adverb: Exit 255 if we somehow lose the main process


If waiting for child processes fails with ECHILD, that would signify
that our main process was somehow reparented away, or was reaped by
another thread. This shouldn't happen, but if it does, it makes sense
to report it as equivalent to exiting with an unknown status, instead
of the current EX_UNAVAILABLE.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f3eaff4a
No related branches found
No related tags found
1 merge request!672pv-adverb: Improve test coverage, fix behaviour in various corner cases
Pipeline #78349 passed
...@@ -1405,7 +1405,10 @@ main (int argc, ...@@ -1405,7 +1405,10 @@ main (int argc,
/* Reap child processes until child_pid exits */ /* Reap child processes until child_pid exits */
if (!pv_wait_for_child_processes (child_pid, &wait_status, error)) if (!pv_wait_for_child_processes (child_pid, &wait_status, error))
goto out; {
ret = LAUNCH_EX_CANNOT_REPORT;
goto out;
}
child_pid = 0; child_pid = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment