\n"; next; } my ($l) = grep { $_->{'num'} == $n } @{$p->{'locks'}}; if (!$l) { print $text{'kill_gone2'},"
\n"; next; } if ($killed{$pid}) { print &text('kill_already', "".&html_escape($lockfile).""),"
\n"; &unlink_file($lockfile); next; } my $done = kill($sig, $pid); my $lockfile = $l->{'lock'}.".lock"; if ($done) { # Signal was sent, but did it really work? my $dead = 0; for(my $i=0; $i<5; $i++) { if (!kill(0, $pid)) { $dead = 1; last; } sleep(1); } my $args = $p->{'proc'}->{'args'}; if ($dead) { print &text('kill_dead', "".&html_escape($args)."", "".&html_escape($lockfile).""),"
\n"; &unlink_file($lockfile); $killed{$pid}++; } else { print &text('kill_alive', "".&html_escape($args).""),"
\n"; } } else { print &text('kill_failed', $!, "".&html_escape($lockfile).""),"
\n"; &unlink_file($lockfile); } } &ui_print_footer("edit_lock.cgi", $text{'lock_return'});