mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Use standard descriptor names
This commit is contained in:
parent
8238410d4c
commit
e537c22281
|
@ -2079,9 +2079,9 @@ static int spawn(char *file, char *arg1, char *arg2, char *arg3, uchar_t flag)
|
|||
int fd = open("/dev/null", O_WRONLY, 0200);
|
||||
|
||||
if (flag & F_NOSTDIN)
|
||||
dup2(fd, 0);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
dup2(fd, STDIN_FILENO);
|
||||
dup2(fd, STDOUT_FILENO);
|
||||
dup2(fd, STDERR_FILENO);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue