Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2018 02:38:07 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331154 - stable/11/contrib/tnftp/src
Message-ID:  <201803190238.w2J2c72e068967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803190238.w2J2c72e068967>