Guard exit routine against PID.

The new-style atexit implementation used /also/ propagates across fork
calls, so every child which is forked ends up calling finish(). This is
marginally annoying except for Subversion modules, where the
'module_has_conflict' check run by log_command() technically involves a
forked child for the implementation.

Since the abnormal-end finish that gets run by atexit takes priority
over the result code from module_has_conflict it appears that there's
always a conflict.

Instead, just make sure that finish() is only called for real from the
process that installed the handler in the first place.
wilder
Michael Pyne 15 years ago
parent 2462ff493f
commit 7c2233c94c
  1. 3
      kdesrc-build

@ -7562,7 +7562,8 @@ eval
}
else
{
push @atexit_subs, sub { finish($ctx, 99) };
my $curPid = $$;
push @atexit_subs, sub { finish($ctx, 99) if $$ == $curPid };
}
# }}}

Loading…
Cancel
Save