mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 07:57:58 +00:00
Bugfix: if sem is locked by a dead process, release the lock
This commit is contained in:
parent
1f3c0aa2c2
commit
bc0f875e86
|
@ -4072,7 +4072,8 @@ sub acquire {
|
||||||
::debug("Remove dead locks");
|
::debug("Remove dead locks");
|
||||||
my $lockdir = $self->{'lockdir'};
|
my $lockdir = $self->{'lockdir'};
|
||||||
for my $d (<$lockdir/*>) {
|
for my $d (<$lockdir/*>) {
|
||||||
$d =~ m:$lockdir/([0-9]+)\@([-\._a-z0-9])$:o or next;
|
::debug("Lock $d $lockdir\n");
|
||||||
|
$d =~ m:$lockdir/([0-9]+)\@([-\._a-z0-9]+)$:o or next;
|
||||||
my ($pid, $host) = ($1,$2);
|
my ($pid, $host) = ($1,$2);
|
||||||
if($host eq ::hostname()) {
|
if($host eq ::hostname()) {
|
||||||
if(not kill 0, $1) {
|
if(not kill 0, $1) {
|
||||||
|
|
Loading…
Reference in a new issue