mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
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
d6b6639713
commit
d54cfbd18e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328525
|
@ -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…
Reference in a new issue