mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Use _exit() to terminate children
The NNN_PIPE file gets deleted after spawning a child in NOWAIT mode. Steps: - open `nnn` with option `-x` - press `;o` (custom binding) to open fzopen plugin - press `^J` to select a file; it will spawn plugin `.cbcp` in NOWAIT mode - when the intermediate child quits, the NNN_PIPE of parent is also deleted
This commit is contained in:
parent
4401dbe092
commit
c0f423496e
|
@ -1302,7 +1302,7 @@ static pid_t xfork(uchar flag)
|
||||||
p = fork();
|
p = fork();
|
||||||
|
|
||||||
if (p > 0)
|
if (p > 0)
|
||||||
exit(0);
|
_exit(0);
|
||||||
else if (p == 0) {
|
else if (p == 0) {
|
||||||
signal(SIGHUP, SIG_DFL);
|
signal(SIGHUP, SIG_DFL);
|
||||||
signal(SIGINT, SIG_DFL);
|
signal(SIGINT, SIG_DFL);
|
||||||
|
@ -1314,7 +1314,7 @@ static pid_t xfork(uchar flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
perror("fork");
|
perror("fork");
|
||||||
exit(0);
|
_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* so they can be used to stop the child */
|
/* so they can be used to stop the child */
|
||||||
|
|
Loading…
Reference in a new issue