summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli_new.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index b4349b2..f88e5c3 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -2667,7 +2667,10 @@ system_out(const char *cmd, const char *prepend_msg, boolean format)
int status;
wait(&status);
close(cp[0]);
- return WEXITSTATUS(status);
+ if (WIFEXITED(status)) {
+ return WEXITSTATUS(status);
+ }
+ return 1;
}
}