http://git.community.i2p/PurpleI2P/i2pd/src/commit/a077d7671f03f6cb3c940212bbaa28a79500d210/daemon/UnixDaemon.cpp
= 0 ) { LogPrint ( eLogError , " Daemon: could not lock pid file " , pidfile , " : " , strerror ( errno ) ) ; return false ; } char pid [ 10 ] ; sprintf ( pid , " %d \n " , getpid ( ) ) ; ftruncate ( pidFH , 0 ) ; if ( write ( pidFH , pid , strlen ( pid ) ) < 0 ) { LogPrint ( eLogError , " Daemon: could not write pidfile: " , strerror ( errno ) ) ; return false ; } } gracefulShutdownInterval = 0 ; // not specified // Signal handler struct sigaction sa ; sa . sa_handler =...