svn commit: r331154 - stable/11/contrib/tnftp/src
Eitan Adler
eadler at FreeBSD.org
Mon Mar 19 02:38:08 UTC 2018
Author: eadler
Date: Mon Mar 19 02:38:07 2018
New Revision: 331154
URL: https://svnweb.freebsd.org/changeset/base/331154
Log:
MFC r328525:
ftp(1): Use closefrom() instead of individual close()s.
Modified:
stable/11/contrib/tnftp/src/cmds.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/tnftp/src/cmds.c
==============================================================================
--- stable/11/contrib/tnftp/src/cmds.c Mon Mar 19 00:25:10 2018 (r331153)
+++ stable/11/contrib/tnftp/src/cmds.c Mon Mar 19 02:38:07 2018 (r331154)
@@ -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)
More information about the svn-src-stable-11
mailing list