X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libevent%2Fdevpoll.c;h=f99cc013d336b5daa1383dddf5b61a1ce8341e38;hb=a9d021328c3d004445a543c075514b5dc85a2202;hp=55f89d28222d30a85c2ad555d51b5da2d750ec54;hpb=313b5f94348618d65523c1d8bde1fba9988f040a;p=netatalk.git diff --git a/libevent/devpoll.c b/libevent/devpoll.c index 55f89d28..f99cc013 100644 --- a/libevent/devpoll.c +++ b/libevent/devpoll.c @@ -1,6 +1,6 @@ /* * Copyright 2000-2009 Niels Provos - * 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);