On 12/20/19 2:40 PM, Karstens, Nate wrote:
That might be, but it would be good to document the tradeoffs associated with 
that efficiency. Even better would be to come up with a mechanism to avoid it 
entirely. If requiring pthread_atfork() handlers to execute is not an option, 
then maybe a file-descriptor/socket option that marks the socket as closing 
once the process forks (like SOCK_CLOEXEC / FD_CLOEXEC, but done at fork() 
instead of exec()).

Solaris has FD_CLOFORK et al. for that purpose:
https://docs.oracle.com/cd/E88353_01/html/E37841/fcntl-2.html

https://lwn.net/Articles/785430/ suggests AIX, BSD, & MacOS have also defined
it, and though it's been proposed multiple times for Linux, never adopted there.

--
        -Alan Coopersmith-               alan.coopersm...@oracle.com
         Oracle Solaris Engineering - https://blogs.oracle.com/alanc

Reply via email to