Changeset 672
- Timestamp:
- 04/10/2006 12:19:35 PM (3 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
pdns_recursor.cc (modified) (3 diffs)
-
rec_control.cc (modified) (2 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 -
trunk/pdns/pdns/rec_control.cc
r633 r672 32 32 { 33 33 arg().set("config-dir","Location of configuration directory (pdns.conf)")=SYSCONFDIR; 34 34 35 arg().set("socket-dir","Where the controlsocket will live")=LOCALSTATEDIR; 36 arg().set("socket-pid","When controlling multiple recursors, the target pid")=""; 37 35 38 arg().setCmd("help","Provide this helpful message"); 36 39 … … 50 53 51 54 RecursorControlChannel rccS; 52 rccS.connect(arg()["socket-dir"], "pdns_recursor.controlsocket"); 55 string sockname="pdns_recursor.controlsocket"; 56 if(!arg()["socket-pid"].empty()) 57 sockname+="."+arg()["socket-pid"]; 58 59 rccS.connect(arg()["socket-dir"], sockname); 53 60 54 61 const vector<string>&commands=arg().getCommands();