mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-03 16:10:14 +01:00
kqueue: open watched directories with close-on-exec flag
[FreeBSD and OpenBSD contributors clarified that O_CLOEXEC has been supported for ~ 2 years on both, so for the moment we're assuming that every platform with kqueue also has working O_CLOEXEC. Please reopen the bug, with a tested patch that uses _dbus_fd_set_close_on_exec() instead, if this assumption turns out to be false. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72213 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
854554c3a6
commit
f4618906b0
1 changed files with 1 additions and 1 deletions
|
|
@ -259,7 +259,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
|
|||
/* FIXME - less lame error handling for failing to add a watch;
|
||||
* we may need to sleep.
|
||||
*/
|
||||
fd = open (new_dirs[i], O_RDONLY);
|
||||
fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue