OK, but then how do you clean up the UNIX-domain socket used for FD passing? Exact same problem.
-
-
Replying to @Myriachan
If it's sharing among related processes, you just inherit the fd. No need to pass over socket. If client-server, server owns listening socket name.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @Myriachan
Whenever you have named/addressable resources someone has to be responsible for ownership & lifetime of name.
1 reply 0 retweets 0 likes -
Replying to @RichFelker
UNIX needs a flag to open, bind and shm_open that says, delete link if the last handle that was opened through that link is closed.
1 reply 0 retweets 0 likes -
Replying to @Myriachan @RichFelker
TCP sockets work this way, so why can't UNIX optionally also?
1 reply 0 retweets 0 likes -
-
Replying to @RichFelker @Myriachan
People actually spend effort working around them in network code.
1 reply 0 retweets 0 likes -
Replying to @RichFelker
And people like me spend effort writing code to clean up after a process crashes.
1 reply 0 retweets 0 likes -
-
Replying to @RichFelker
Windows programs that crash don't leave their shared memory around.
1 reply 0 retweets 0 likes
Neither do unix ones unless you're using backwards programming idioms. shm_open+shm_unlink is atomic for all practical purposes (unlike many other situations where non-atomicity creates races).
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.