From: Lebbeous Fogle-Weekley Date: Fri, 31 Jan 2014 20:50:01 +0000 (-0500) Subject: Offer ability to ignore what seem like orphan processes when starting things X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c699880325668cc0dad86bf3aab365169673058c;p=working%2FOpenSRF.git Offer ability to ignore what seem like orphan processes when starting things Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index 294288a..e0d4441 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -55,6 +55,7 @@ my $opt_restart_services = 0; my $opt_force_clean_process = 0; my $opt_quiet = 0; my $opt_diagnostic = 0; +my $opt_ignore_orphans = 0; my $sclient; my @perl_services; my @nonperl_services; @@ -89,7 +90,8 @@ GetOptions( 'start-services' => \$opt_start_services, 'stop-services' => \$opt_stop_services, 'restart-services' => \$opt_restart_services, - 'diagnostic' => \$opt_diagnostic + 'diagnostic' => \$opt_diagnostic, + 'are-there-no-prisons' => \$opt_ignore_orphans ); if ($opt_localhost) { @@ -357,7 +359,7 @@ sub do_start { unlink $pidfile; } - } elsif (@ps_pids) { # orphan process + } elsif (@ps_pids and not $opt_ignore_orphans) { # orphan process if ($opt_force_clean_process) { msg("service $service pid=@ps_pids is running with no pidfile"); @@ -654,7 +656,12 @@ sub do_help { --force-clean-process When starting a service, if a service process is already running but no pidfile exists, kill the service process before starting - the new one. + the new one. This applies to routers too. + + --are-there-no-prisons + When starting a service, if a service procses is already running but + no pidfile exists, ignore the existing process and carry on starting + the new one (i.e., ignore orphans). This applies to routers too. ==== stopping services =====