From 587250b286a2cd9b02c296e5d78ecd21c7bdf255 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Wed, 20 Oct 2010 19:53:29 +0000 Subject: [PATCH] Get rid of hand-rolled closefrom(3). --- usr.bin/login/login.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 3e826d57bda..e671c8dfac7 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -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