Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2010 19:53:29 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214115 - head/usr.bin/login
Message-ID:  <201010201953.o9KJrTki067214@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Wed Oct 20 19:53:29 2010
New Revision: 214115
URL: http://svn.freebsd.org/changeset/base/214115

Log:
  Get rid of hand-rolled closefrom(3).

Modified:
  head/usr.bin/login/login.c

Modified: head/usr.bin/login/login.c
==============================================================================
--- head/usr.bin/login/login.c	Wed Oct 20 19:52:27 2010	(r214114)
+++ head/usr.bin/login/login.c	Wed Oct 20 19:53:29 2010	(r214115)
@@ -233,8 +233,7 @@ main(int argc, char *argv[])
 
 	setproctitle("-%s", getprogname());
 
-	for (cnt = getdtablesize(); cnt > 2; cnt--)
-		(void)close(cnt);
+	closefrom(3);
 
 	/*
 	 * Get current TTY



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