1
Fork 0
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:
Andreas Kling 2020-08-15 11:14:09 +02:00
parent 65f2270232
commit 46e53417c9

View file

@ -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);
}