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

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to