aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index ee387bb..3fc866f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -42,6 +42,8 @@ static int wait_for_child(pid_t pid, int *ec)
if (WIFEXITED(status))
*ec = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status))
+ *ec = status; /* Same as $?. */
else
*ec = -1;