]> arthur.barton.de Git - netatalk.git/blobdiff - libevent/devpoll.c
fce: afpd: fix event names array
[netatalk.git] / libevent / devpoll.c
index 55f89d28222d30a85c2ad555d51b5da2d750ec54..f99cc013d336b5daa1383dddf5b61a1ce8341e38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 2000-2009 Niels Provos <provos@citi.umich.edu>
- * Copyright 2009-2010 Niels Provos and Nick Mathewson
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -129,7 +129,7 @@ devpoll_init(struct event_base *base)
                nfiles = rl.rlim_cur;
 
        /* Initialize the kernel queue */
-       if ((dpfd = open("/dev/poll", O_RDWR)) == -1) {
+       if ((dpfd = evutil_open_closeonexec("/dev/poll", O_RDWR, 0)) == -1) {
                event_warn("open: /dev/poll");
                mm_free(devpollop);
                return (NULL);