mirror of
https://github.com/vale981/yabar
synced 2025-03-05 09:31:39 -05:00
use _exit instead of exit for fork child
This commit is contained in:
parent
c9aa3824be
commit
470ab05be1
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue