ftp(1): Use closefrom() instead of individual close()s.
Use closefrom(3) instead of manually closing all file descriptors between 3 and 19. Obtained from: OpenBSD (CVS 1.80)
This commit is contained in:
parent
1912ffb2e5
commit
f53a3d61ba
@ -1438,8 +1438,7 @@ shell(int argc, char *argv[])
|
||||
}
|
||||
oldintr = xsignal(SIGINT, SIG_IGN);
|
||||
if ((pid = fork()) == 0) {
|
||||
for (pid = 3; pid < 20; pid++)
|
||||
(void)close(pid);
|
||||
(void)closefrom(3);
|
||||
(void)xsignal(SIGINT, SIG_DFL);
|
||||
shellp = getenv("SHELL");
|
||||
if (shellp == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user