mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:28:11 +00:00
Kernel: socket() with SOCK_CLOEXEC was setting the wrong fd flag.
Turns out FD_CLOEXEC and O_CLOEXEC are different values. Silly mistake. I noticed that Terminal's shell process still had the Terminal's window server connection open, albeit in a broken state.
This commit is contained in:
parent
b6bf26430d
commit
7bb00ea1e3
1 changed files with 1 additions and 1 deletions
|
@ -2236,7 +2236,7 @@ int Process::sys$socket(int domain, int type, int protocol)
|
|||
auto descriptor = FileDescriptor::create(move(socket));
|
||||
unsigned flags = 0;
|
||||
if (type & SOCK_CLOEXEC)
|
||||
flags |= O_CLOEXEC;
|
||||
flags |= FD_CLOEXEC;
|
||||
if (type & SOCK_NONBLOCK)
|
||||
descriptor->set_blocking(false);
|
||||
m_fds[fd].set(move(descriptor), flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue