more pidfile fixing

tmp
Alexander Zangerl 2003-02-08 13:09:39 +00:00
parent c375152b9e
commit 29c3635e49
1 changed files with 2 additions and 1 deletions

3
kuvert
View File

@ -20,7 +20,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: kuvert,v 2.5 2003/02/05 22:45:39 az Exp az $
# $Id: kuvert,v 2.6 2003/02/08 13:08:06 az Exp az $
#--
use strict;
@ -104,6 +104,7 @@ sub main
open(PIDF,">$pidf") || &bailout("cant open >$pidf: $!");
}
my $other=<PIDF>;
chomp $other;
seek(PIDF,0,'SEEK_SET');
logit("there seems to be another instance with PID $other") if ($other);
&bailout("cant lock $pidf ($!), exiting.")