aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo.c
diff options
context:
space:
mode:
Diffstat (limited to 'pseudo.c')
-rw-r--r--pseudo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pseudo.c b/pseudo.c
index 8cf946b..4451992 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -422,7 +422,14 @@ main(int argc, char *argv[]) {
if (opt_S) {
pseudo_client_shutdown();
}
- return WEXITSTATUS(rc);
+ if (WIFEXITED(rc)) {
+ return WEXITSTATUS(rc);
+ } else if (WIFSIGNALED(rc)) {
+ kill(getpid(), WTERMSIG(rc));
+ exit(1);
+ } else {
+ exit(1);
+ }
} else {
rc = execv(fullpath, argv);
if (rc == -1) {