diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 23:50:48 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 23:50:48 +0000 |
commit | 96e1b38586e80a0f014038bf4fdf4689c668fbd6 (patch) | |
tree | d7f6a7866700601598cfcc006b7dcb6cb4a7c07e /miscutils/devfsd.c | |
parent | deabacdf91c6d1c3cfcdb4cd06780807193de81d (diff) | |
download | busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.tar.gz busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.tar.bz2 busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.zip |
introduce and use close_on_exec_on(fd). -50 bytes.
Diffstat (limited to 'miscutils/devfsd.c')
-rw-r--r-- | miscutils/devfsd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index bfa5c1727..734d4a7d9 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -371,10 +371,7 @@ int devfsd_main(int argc, char **argv) | |||
371 | xchdir(mount_point); | 371 | xchdir(mount_point); |
372 | 372 | ||
373 | fd = xopen(".devfsd", O_RDONLY); | 373 | fd = xopen(".devfsd", O_RDONLY); |
374 | 374 | close_on_exec_on(fd); | |
375 | if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) | ||
376 | bb_perror_msg_and_die("FD_CLOEXEC"); | ||
377 | |||
378 | xioctl(fd, DEVFSDIOC_GET_PROTO_REV, &proto_rev); | 375 | xioctl(fd, DEVFSDIOC_GET_PROTO_REV, &proto_rev); |
379 | 376 | ||
380 | /*setup initial entries */ | 377 | /*setup initial entries */ |