[Nbd] The purpose of dontfork in handle_connection()?
Hi
What is the purpose of testing the 'dontfork' -flag inside
handle_connection()?
Its usage in main() is obvious: to check whether the server should
daemonize or not, but why it's also used in handle_connection() to
check whether to fork a handler or not. Seems a bit weird to me.
To not daemonize the parent process can be helpful when
debugging/testing etc., but to not fork a connection handler makes the
server effectively a one shot wonder and useless even in debugging
sessions, right?
( If someone wonders why I stumbled across this one: I'll try to move
the whole negotiation procedure to the child process, and cleanup the
server code alongside. )
--
Tuomas
Reply to: