diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-10-30 12:31:59 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-10-30 12:39:04 +0100 |
commit | 26347a4c5538008318188118872490128f43fcd3 (patch) | |
tree | 1bd46e51f23a581bc4ac0faa591a58487b015bda /udev/udevd.c | |
parent | 82c6558e0109f66091e3a8e2c4ceef0372b0b331 (diff) |
use CLOEXEC flags instead of fcntl()
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index dfdbb4c245..88e117f50a 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -223,7 +223,6 @@ static void worker_new(struct event *event) /* allow the main daemon netlink address to send devices to the worker */ udev_monitor_allow_unicast_sender(worker_monitor, monitor); udev_monitor_enable_receiving(worker_monitor); - util_set_fd_cloexec(udev_monitor_get_fd(worker_monitor)); worker = calloc(1, sizeof(struct worker)); if (worker == NULL) @@ -945,14 +944,13 @@ int main(int argc, char *argv[]) } /* unnamed socket from workers to the main daemon */ - if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, worker_watch) < 0) { + if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) { fprintf(stderr, "error getting socketpair\n"); err(udev, "error getting socketpair\n"); rc = 6; goto exit; } pfd[FD_WORKER].fd = worker_watch[READ_END]; - util_set_fd_cloexec(worker_watch[WRITE_END]); rules = udev_rules_new(udev, resolve_names); if (rules == NULL) { |