lib/daemon.js
function write(conf) {
  var contents = process.pid + EOL
    , file = conf.get(ConfigKey.PIDFILE);
  // can be the empty string
  if(file) {
    try {
      fs.writeFileSync(file, contents);
      log.notice('wrote pid %s to %s', process.pid, file);
    }catch(e) {
      log.warning('failed to write pid file (%s): %s', file, e.message);
    }
  }
}
function write(conf) {
  var contents = process.pid + EOL
    , file = conf.get(ConfigKey.PIDFILE);
  // can be the empty string
  if(file) {
    try {
      fs.writeFileSync(file, contents);
      log.notice('wrote pid %s to %s', process.pid, file);
    }catch(e) {
      log.warning('failed to write pid file (%s): %s', file, e.message);
    }
  }
}
function write ( conf ) { var contents = process . pid + EOL , file = conf . get ( ConfigKey . PIDFILE ) ; // can be the empty string if ( file ) { try { fs . writeFileSync ( file , contents ) ; log . notice ( 'wrote pid %s to %s' , process . pid , file ) ; } catch ( e ) { log . warning ( 'failed to write pid file (%s): %s' , file , e . message ) ; } } }
Write the pid file.
Write the pid file .