wait for the parent proc to go away before we unlink the file
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 4 Aug 2008 01:43:34 +0000 (01:43 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 4 Aug 2008 01:43:34 +0000 (01:43 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1385 9efc2488-bf62-4759-914b-345cdb29e865

bin/opensrf-perl.pl

index 3ab5f57..7211601 100755 (executable)
@@ -57,6 +57,7 @@ sub do_stop {
     if(-e $pid_file) {
         my $pid = `cat $pid_file`;
         kill('INT', $pid);
+        waitpid($pid, 0);
         unlink $pid_file;
     } else {
         msg("$service not running");