浏览代码

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
master
Arun Prakash Jana 4 年前
父节点
当前提交
c0f423496e
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/nnn.c

+ 2
- 2
src/nnn.c 查看文件

@@ -1302,7 +1302,7 @@ static pid_t xfork(uchar flag)
p = fork();

if (p > 0)
exit(0);
_exit(0);
else if (p == 0) {
signal(SIGHUP, SIG_DFL);
signal(SIGINT, SIG_DFL);
@@ -1314,7 +1314,7 @@ static pid_t xfork(uchar flag)
}

perror("fork");
exit(0);
_exit(0);
}

/* so they can be used to stop the child */


正在加载...
取消
保存