From: Viktor Szakats Date: Mon, 14 Apr 2025 21:47:30 +0000 (+0200) Subject: processhelp.pm: always call `taskkill` with `-f` (force) X-Git-Tag: curl-8_14_0~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e203f65a1e5e448daf1da2b8c3aaa33654dd080;p=thirdparty%2Fcurl.git processhelp.pm: always call `taskkill` with `-f` (force) In the hope this avoid a possible hang in `taskkill`. To kill processes, `runtests` first tries to kill them gently (with "TERM", or on Windows `taskkill`), then waits some time for them to disappear and then kills them with `KILL`, or on Windows with `taskkill -f`. This happens within `killpid()`. This patch bumps the gentle phase to `taskkill -f`. On the obervation that a non-forced `taskkill` may hang in cases: msvc, CM x64-windows wolfssl +examples: ``` [...] test 3006...[SMTP with multiple invalid (all) --mail-rcpt and --mail-rcpt-allowfails] --p----e--- OK (1682 out of 1718, remaining: 00:04, took 0.524s, duration: 03:13) test 3005...[SMTP with multiple and invalid (all but one) --mail-rcpt and --mail-rcpt-allowfails] --p-u--e-Executing: 'taskkill -t -pid 1196 >nul 2>&1' ``` Ref: https://github.com/curl/curl/actions/runs/14445993473/job/40508986059?pr=17051#step:15:4176 Cancelling the job worked, resulting in a greyed out status, with the above step and log entries lost. If this change causes issues or does nothing at all, we may revert it or limit it to CI runs. Ref: #14854 Closes #17054 --- diff --git a/tests/processhelp.pm b/tests/processhelp.pm index 283188c1a2..e601399bbc 100644 --- a/tests/processhelp.pm +++ b/tests/processhelp.pm @@ -168,7 +168,7 @@ sub pidterm { $pid -= 4194304; if($^O ne 'MSWin32') { # https://ss64.com/nt/taskkill.html - my $cmd = "taskkill -t -pid $pid >nul 2>&1"; + my $cmd = "taskkill -f -t -pid $pid >nul 2>&1"; print "Executing: '$cmd'\n"; system($cmd); return;