pulumi/sdk/go/common/util/cmdutil/testdata
Abhinav Gupta b67c72149c
feat(cmdutil): TerminateProcessGroup for graceful termination (#13792)
Adds a new **currently unused** function TerminateProcessGroup
that terminates all processes in a group gracefully.

It does so by first sending the process
a SIGINT on Unix systems, and CTRL_BREAK_EVENT on Windows,
and waiting a specified duration for the process to exit.
The choice of signals was very deliberate
and is documented in the comments for TerminateProcessGroup.

If the process does not exit in the given duration,
it and its child processes are forcibly terminated
with SIGKILL or equivalent.

Testing:
The core behaviors are tested against Python, Go, and Node.
The corner cases of signal handling are tested
against rogue Go processes.
The changes were experimented with in #13760.

Refs #9780
2023-08-27 22:05:44 +00:00
..
frozen.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
frozen.js feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
frozen.py feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
frozen_with_child.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
graceful.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
graceful.js feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
graceful.py feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
graceful_with_child.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
unhandled.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
unhandled.js feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
unhandled.py feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00