mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
CEventLoop: Create the wake pipe with O_CLOEXEC
This ensures the pipe fds don't leak into child processes. This manifested as the Shell (and all processes started from the shell) having two mysterious FIFOs open. This was happening because of the Terminal, which the shell was spawned form, leaking its CEventLoop wake pipe fds.
This commit is contained in:
parent
9c3b1ca0c6
commit
211b51dab7
Notes:
sideshowbarker
2024-07-19 12:52:17 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/211b51dab7b Pull-request: https://github.com/SerenityOS/serenity/pull/409
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ CEventLoop::CEventLoop()
|
|||
|
||||
if (!s_main_event_loop) {
|
||||
s_main_event_loop = this;
|
||||
int rc = pipe(s_wake_pipe_fds);
|
||||
int rc = pipe2(s_wake_pipe_fds, O_CLOEXEC);
|
||||
ASSERT(rc == 0);
|
||||
s_event_loop_stack->append(this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue