Use standard descriptor names

This commit is contained in:
Arun Prakash Jana 2021-06-11 23:35:57 +05:30
parent 8238410d4c
commit e537c22281
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -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);
}