Set O_CLOEXEC on the remaining FDs that are created by eventcore.
This commit is contained in:
parent
324338205b
commit
6e2938297b
4 changed files with 13 additions and 8 deletions
|
@ -34,7 +34,7 @@ final class InotifyEventDriverWatchers(Events : EventDriverEvents) : EventDriver
|
|||
import std.range.primitives : walkLength;
|
||||
|
||||
enum IN_NONBLOCK = 0x800; // value in core.sys.linux.sys.inotify is incorrect
|
||||
auto handle = () @trusted { return inotify_init1(IN_NONBLOCK); } ();
|
||||
auto handle = () @trusted { return inotify_init1(IN_NONBLOCK | IN_CLOEXEC); } ();
|
||||
if (handle == -1) return WatcherID.invalid;
|
||||
|
||||
auto ret = WatcherID(handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue