| 322 | |
| 323 | |
| 324 | void ServerApplication::handlePidFile(Exception& ex,const string& value) { |
| 325 | ofstream ostr(value.c_str(), ios::out | ios::binary); |
| 326 | if (!ostr.good()) { |
| 327 | ex.set(Exception::FILE,"Cannot write PID to file ",value); |
| 328 | return; |
| 329 | } |
| 330 | ostr << Process::Id() << endl; |
| 331 | _pidFile = value; |
| 332 | } |
| 333 | |
| 334 | #endif |
| 335 |