use _exit instead of exit for fork child

This commit is contained in:
geommer 2016-03-21 13:25:45 +02:00
parent c9aa3824be
commit 470ab05be1

View file

@ -20,7 +20,7 @@ static void ya_exec_redir_once(ya_block_t *blk) {
setvbuf(stdout,NULL,_IONBF,0); setvbuf(stdout,NULL,_IONBF,0);
execl(yashell, yashell, "-c", blk->cmd, (char *) NULL); execl(yashell, yashell, "-c", blk->cmd, (char *) NULL);
exit(EXIT_SUCCESS); _exit(EXIT_SUCCESS);
} }
else { else {
wait(NULL); wait(NULL);
@ -41,7 +41,7 @@ static void ya_exec_redir_period(ya_block_t *blk) {
setvbuf(stdout,NULL,_IONBF,0); setvbuf(stdout,NULL,_IONBF,0);
execl(yashell, yashell, "-c", blk->cmd, (char *) NULL); execl(yashell, yashell, "-c", blk->cmd, (char *) NULL);
exit(EXIT_SUCCESS); _exit(EXIT_SUCCESS);
} }
//close(opipe[1]); //close(opipe[1]);
wait(NULL); wait(NULL);