Changeset 672 for trunk/pdns/pdns/pdns_recursor.cc
- Timestamp:
- 04/10/06 12:19:35 (4 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/pdns_recursor.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/pdns_recursor.cc
r670 r672 389 389 void makeControlChannelSocket() 390 390 { 391 s_rcc.listen(::arg()["socket-dir"]+"/pdns_recursor.controlsocket"); 391 string sockname=::arg()["socket-dir"]+"/pdns_recursor.controlsocket"; 392 if(::arg().mustDo("fork")) { 393 sockname+="."+lexical_cast<string>(getpid()); 394 L<<Logger::Warning<<"Forked control socket name: "<<sockname<<endl; 395 } 396 s_rcc.listen(sockname); 392 397 } 393 398 … … 700 705 ::arg().set("allow-from", "If set, only allow these comma separated netmasks to recurse")=""; 701 706 ::arg().set("max-tcp-per-client", "If set, maximum number of TCP sessions per client (IP address)")="0"; 707 ::arg().set("fork", "If set, fork the daemon for possible double performance")="no"; 702 708 703 709 ::arg().setCmd("help","Provide a helpful message"); … … 750 756 } 751 757 752 makeClientSocket();753 758 makeUDPServerSockets(); 754 759 makeTCPServerSockets(); 760 761 if(::arg().mustDo("fork")) { 762 fork(); 763 L<<Logger::Warning<<"This is forked pid "<<getpid()<<endl; 764 } 765 makeClientSocket(); 766 755 767 makeControlChannelSocket(); 756 768