]> git.ipfire.org Git - thirdparty/curl.git/commit
processhelp.pm: always call `taskkill` with `-f` (force)
authorViktor Szakats <commit@vsz.me>
Mon, 14 Apr 2025 21:47:30 +0000 (23:47 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 14 Apr 2025 23:20:24 +0000 (01:20 +0200)
commit4e203f65a1e5e448daf1da2b8c3aaa33654dd080
tree04d2d42b5b5f8427a86d0617ef201206581cb1be
parent160656410dd17e86adb19b325d627f68201a3973
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
tests/processhelp.pm