What should we do in the mac case? Do we actually need it there?
We just use libc::daemon in other unix platforms to move the server executable to the background
for it to not be killed when the first client closes. Maybe there's some other way to do it?
Maybe on mac we can actually spawn the process directly as a daemon (using fork instead of posix_spawn right now)?
Or maybe just expand the code inside mac's libc::daemon (which is here).
Need help on this since it's kinda hard for me to test since I don't have a mac accessible.
What should we do in the mac case? Do we actually need it there?
We just use
libc::daemon
in other unix platforms to move the server executable to the background for it to not be killed when the first client closes. Maybe there's some other way to do it? Maybe on mac we can actually spawn the process directly as a daemon (usingfork
instead ofposix_spawn
right now)? Or maybe just expand the code inside mac'slibc::daemon
(which is here).Need help on this since it's kinda hard for me to test since I don't have a mac accessible.