blind

suckless command-line video editing utility
git clone git://git.suckless.org/blind
Log | Files | Refs | README | LICENSE

commit 3af282923654b1b92de0c48f24e4ab926b5cf328
parent a2eb10b156eafd5fc900471dded83c78adc5d46d
Author: Mattias Andrée <maandree@kth.se>
Date:   Tue,  2 May 2017 20:17:38 +0200

Fix call to exit in enjoin_jobs

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
Msrc/util.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util.c b/src/util.c @@ -221,8 +221,8 @@ enjoin_jobs(int status, int is_master, pid_t *pids) for (i = 0; pids[i] != -1; i++) { if (waitpid(pids[i], &stat, 0) == -1) enprintf(status, "waitpid:"); - if (stat) - exit(status); + if (status) + exit(WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status)); } free(pids); }