4 ms·
> 99% of the time you immediately call exec after fork What about forking servers? listen() and then immediately fork() to handle the inbound connection? Those
by outworlder 5y ago
> 99% of the time you immediately call exec after fork
What about forking servers? listen() and then immediately fork() to handle the inbound connection? Those don't need exec.
Also daemons. It's a common pattern to ditch permissions and then fork(), as per the old "Linux Daemon Writing HOWTO".
- lisper 5y agoDo people really do that? It sounds like a huge DOS vulnerability to me.
- cryptonector 5y agoYou can vfork()+exec(), why not? Exec too expensive? You can prefork[0]. [0] https://github.com/elric1/prefork