diff options
author | Christian Walde <walde.christian@gmail.com> | 2020-09-16 21:06:48 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-09-16 13:10:57 -0600 |
commit | bbd21b340219e33e5603768033f78c673149bc9b (patch) | |
tree | 564e49c0cdc24bf48dfa060732376768ad9f208c | |
parent | c3788eea4d958f1c7797de83aa454b51176cc9ca (diff) | |
download | perl-bbd21b340219e33e5603768033f78c673149bc9b.tar.gz |
prevent a spurious error output from test.pl when killing a cygwin process
Under Cygwin a process can sometimes take a little while to spool down
after being killed. There already is code to wait a second and retry.
However if the process has already disappeared in the wait second, then the
retry is engaged anyhow and will then complain it can't find the process.
This change makes it so test.pl only truly attempts to kill a cygwin
process if it actually is still around.
This resolves the secondary bug in #18129.
-rw-r--r-- | t/test.pl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1716,7 +1716,7 @@ sub watchdog ($;$) if ($is_cygwin) { # sometimes the above isn't enough on cygwin sleep 1; # wait a little, it might have worked after all - system("/bin/kill -f $pid_to_kill"); + system("/bin/kill -f $pid_to_kill") if kill(0, $pid_to_kill); } } |