runshutdown(): get rid of getdtablesize loop, it gains nothing now
but can waste time if many descriptors are available
This commit is contained in:
parent
25cf4a545a
commit
3ee1f2280e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=27942
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: init.c,v 1.24 1997/08/02 00:22:49 davidn Exp $
|
||||
* $Id: init.c,v 1.25 1997/08/06 16:07:52 ache Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -1459,9 +1459,6 @@ runshutdown()
|
||||
(void) sigaction(SIGTSTP, &sa, (struct sigaction *)0);
|
||||
(void) sigaction(SIGHUP, &sa, (struct sigaction *)0);
|
||||
|
||||
for (fd = getdtablesize(); fd-- > 2; )
|
||||
(void)close(fd);
|
||||
|
||||
if ((fd = open(_PATH_CONSOLE, O_RDWR)) == -1)
|
||||
warning("can't open %s: %m", _PATH_CONSOLE);
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user