From 470ab05be108200efab09a7a49562c61ce5e38cb Mon Sep 17 00:00:00 2001 From: geommer Date: Mon, 21 Mar 2016 13:25:45 +0200 Subject: [PATCH] use _exit instead of exit for fork child --- src/ya_exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ya_exec.c b/src/ya_exec.c index 2fca4fc..f3cfe1b 100644 --- a/src/ya_exec.c +++ b/src/ya_exec.c @@ -20,7 +20,7 @@ static void ya_exec_redir_once(ya_block_t *blk) { setvbuf(stdout,NULL,_IONBF,0); execl(yashell, yashell, "-c", blk->cmd, (char *) NULL); - exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); } else { wait(NULL); @@ -41,7 +41,7 @@ static void ya_exec_redir_period(ya_block_t *blk) { setvbuf(stdout,NULL,_IONBF,0); execl(yashell, yashell, "-c", blk->cmd, (char *) NULL); - exit(EXIT_SUCCESS); + _exit(EXIT_SUCCESS); } //close(opipe[1]); wait(NULL);