mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03: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
Notes:
sideshowbarker
2024-07-19 03:37:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/46e53417c92
@ -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…
Reference in New Issue
Block a user