Skip to content

Improved ProcessGroupKill for Windows

Arran Walker requested to merge ajwalker/pgkill into master

What does this MR do?

On windows:

  • Only taskkill processes that are still running (if ProcessState isn't nil, the process has already ended).
  • Kill the entire process group using CTRL_BREAK_EVENT
  • Should (massively?) speed up Windows tests as taskkill was previously running everytime we executed something.

In general:

  • Ensures that the correct settings were used to create and end the process by returning a function that handles termination, only once correct creation settings are set.

Why was this MR needed?

  • Terminating a Windows process was occasionally leaving children running.
  • taskkill was running even when the process was dead.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Likely resolves: #6520 #3747 #3121 (closed) !1797 (merged)

Merge request reports