mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:03:36 +03:00
Andrew Benham fixed a race condition in the test suite that could cause the
test script to kill all processes in the current process group!
This commit is contained in:
parent
d9bd5de0b1
commit
bebf70667d
3 changed files with 10 additions and 4 deletions
|
|
@ -249,9 +249,10 @@ sub startnew {
|
|||
open(PID, "<$pidfile");
|
||||
$pid2 = 0 + <PID>;
|
||||
close(PID);
|
||||
if(kill(0, $pid2)) {
|
||||
# make sure this pid is alive, as otherwise it is just likely
|
||||
# to be the _previous_ pidfile or similar!
|
||||
if($pid2 && kill(0, $pid2)) {
|
||||
# if $pid2 is valid, then make sure this pid is alive, as
|
||||
# otherwise it is just likely to be the _previous_ pidfile or
|
||||
# similar!
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue