Show
Ignore:
Timestamp:
03/25/07 13:33:06 (6 years ago)
Author:
ahu
Message:

close ticket 120 - pdns-recursor leaves behind pidfile & controlsocket on controlled exit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/pdns_recursor.cc

    r972 r988  
    396396} 
    397397 
    398  
     398string s_pidfname; 
    399399static void writePid(void) 
    400400{ 
    401   string fname=::arg()["socket-dir"]+"/"+s_programname+".pid"; 
    402   ofstream of(fname.c_str()); 
     401  s_pidfname=::arg()["socket-dir"]+"/"+s_programname+".pid"; 
     402  ofstream of(s_pidfname.c_str()); 
    403403  if(of) 
    404404    of<< Utility::getpid() <<endl; 
    405405  else 
    406     L<<Logger::Error<<"Requested to write pid for "<<Utility::getpid()<<" to "<<fname<<" failed: "<<strerror(errno)<<endl; 
     406    L<<Logger::Error<<"Requested to write pid for "<<Utility::getpid()<<" to "<<s_pidfname<<" failed: "<<strerror(errno)<<endl; 
    407407} 
    408408