mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
SystemServer: Adjust assertion+comment for new dup2() behavior
dup2(fd, fd) will no longer clear CLOEXEC on the descriptor.
This commit is contained in:
parent
65f2270232
commit
46e53417c9
1 changed files with 1 additions and 2 deletions
|
@ -252,10 +252,9 @@ void Service::spawn(int socket_fd)
|
|||
|
||||
if (socket_fd >= 0) {
|
||||
ASSERT(!m_socket_path.is_null());
|
||||
ASSERT(socket_fd > 2);
|
||||
ASSERT(socket_fd > 3);
|
||||
dup2(socket_fd, 3);
|
||||
// The new descriptor is !CLOEXEC here.
|
||||
// This is true even if socket_fd == 3.
|
||||
setenv("SOCKET_TAKEOVER", "1", true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue