diff options
| author | Roy Marples <roy@marples.name> | 2008-11-05 13:09:18 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-11-05 13:09:18 +0000 |
| commit | c93e8528e09c322d105b00711a26cb54f5926422 (patch) | |
| tree | 5e8126802c545884b55e9f630e56cded92b99e25 /common.c | |
| parent | 5b7112f52583dff9385712b40bb800e2febd36ad (diff) | |
| download | dhcpcd-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.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -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) { |
