You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are libraries, such as wlroots and GLib, that do not atomically set O_CLOEXEC on the file descriptors they create. Instead, they require any program using the library to close every file descriptor between fork() and exec(), except for an allowlist that should be passed to the child process.
GLib implements this in its GSubprocess API. Linux supports this with close_range() and many other OSs have a closefrom() syscall. Linux also has a fallback by iterating over /proc/self/fd using the async-signal-safe getdents syscall.