From: <buc...@us...> - 2011-04-04 12:10:51
|
Revision: 229 http://devmon.svn.sourceforge.net/devmon/?rev=229&view=rev Author: buchanmilne Date: 2011-04-04 12:10:45 +0000 (Mon, 04 Apr 2011) Log Message: ----------- Only do pid file checks when daemonizing, allows non-daemonized copy to run (e.g. for use with -f, specifically when working on templates with -f -p -h xxx) Modified Paths: -------------- trunk/modules/dm_config.pm Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2011-04-04 11:26:02 UTC (rev 228) +++ trunk/modules/dm_config.pm 2011-04-04 12:10:45 UTC (rev 229) @@ -280,6 +280,9 @@ # Set our pid $g{'mypid'} = $$; + + # PID file handling + if($g{'daemonize'}) { # Check to see if a pid file exists if(-e $g{'pidfile'}) { # One exists, let see if its stale @@ -296,7 +299,6 @@ } # Now write our pid to the pidfile - if($g{'daemonize'}) { my $pid_handle = new IO::File $g{'pidfile'}, 'w' or log_fatal("Cant write to pidfile $g{'pidfile'} ($!)",0); $pid_handle->print($g{'mypid'}); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |