1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:55:07 +00:00

Kernel: Give each FileDescriptor a chance to co-open sockets.

Track how many fds are open for a socket's Accepted and Connected roles.
This allows fork() to clone a socket fd without a subsequent close() walking
all over the parent process's fd.
This commit is contained in:
Andreas Kling 2019-02-17 11:00:35 +01:00
parent b0be3299b5
commit d5f515cf6c
6 changed files with 51 additions and 27 deletions

View file

@ -36,7 +36,6 @@ bool Socket::listen(int backlog, int& error)
return false;
}
m_backlog = backlog;
m_listening = true;
kprintf("Socket{%p} listening with backlog=%d\n", this, m_backlog);
return true;
}