it's not (generally) "my" pid

This commit is contained in:
hjp 2010-09-11 09:59:24 +00:00
parent 2596541fd0
commit 4f7aa4cc04
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ sub reserve_fileset {
my $rows = $self->{dbh}->do(q{update filesets set pid=? where id = ? and pid is null}, {}, $$, $target->{id});
return if $rows == 1;
my $pid = $self->{dbh}->selectrow_array(q{select pid from filesets where id = ?}, {}, $target->{id});
$self->log(3, "fileset $target->{id} appears to be in use by my pid $pid");
$self->log(3, "fileset $target->{id} appears to be in use by pid $pid");
if (!kill(0, $pid) && $!{ESRCH}) {
$self->log(3, "pid $pid doesn't exist, trying to release fileset $target->{id}");
$self->{dbh}->do(q{update filesets set pid=null where id = ? and pid=?}, {}, $target->{id}, $pid);