summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-11-05 13:09:18 +0000
committerRoy Marples <roy@marples.name>2008-11-05 13:09:18 +0000
commitc93e8528e09c322d105b00711a26cb54f5926422 (patch)
tree5e8126802c545884b55e9f630e56cded92b99e25 /common.c
parent5b7112f52583dff9385712b40bb800e2febd36ad (diff)
downloaddhcpcd-c93e8528e09c322d105b00711a26cb54f5926422.tar.xz
Save a few bytes by moving close_fds to bind where it's really used.
Diffstat (limited to 'common.c')
-rw-r--r--common.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/common.c b/common.c
index 47082cbb..bfd0b9c7 100644
--- a/common.c
+++ b/common.c
@@ -138,23 +138,6 @@ closefrom(int fd)
}
#endif
-/* Close our fd's */
-int
-close_fds(void)
-{
- int fd;
-
- if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1)
- return -1;
-
- dup2(fd, fileno(stdin));
- dup2(fd, fileno(stdout));
- dup2(fd, fileno(stderr));
- if (fd > 2)
- close(fd);
- return 0;
-}
-
int
set_cloexec(int fd)
{