pulumi/sdk/go/common/util/cmdutil
Abhinav Gupta 25901d95c4
resource/plugin: Shut down plugins gracefully (#13795)
Uses the new TerminateProcessGroup functionality introduced in #13792
to shut down plugins gracefully.

Graceful shutdown takes the following form:

- Send a termination signal (SIGINT or CTRL_BREAK_EVENT)
- Wait up to 1 second for the plugin to exit
- Kill it with SIGKILL

Note that TerminateProcessGroup kills the entire group
so we don't need a separate KillChildren and cmd.Process.Kill().

This change also deprecates cmdutil.KillChildren
since we shouldn't really be using SIGKILL as a first resort anyway.

Note that this does not modify the behavior of individual plugins.
Those will exit as usual but with a SIGINT instead of SIGKILL
terminating them.

Resolves #9780
2023-08-29 12:02:54 +00:00
..
testdata feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
args.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
child_unix.go resource/plugin: Shut down plugins gracefully (#13795) 2023-08-29 12:02:54 +00:00
child_windows.go resource/plugin: Shut down plugins gracefully (#13795) 2023-08-29 12:02:54 +00:00
console.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
console_password.go crypto/ssh/terminal is deprecated 2023-01-12 09:07:34 -08:00
console_test.go go/cmdutil: Test for IsTruthy 2023-03-07 10:01:07 -08:00
diag.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
exit.go Support bailing from RunFunc (#13804) 2023-08-29 07:43:40 +00:00
exit_test.go Support bailing from RunFunc (#13804) 2023-08-29 07:43:40 +00:00
profile.go [cli] Better memory profiling 2023-05-25 09:20:12 -07:00
spinner.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
term.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
term_test.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
term_unix.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
term_windows.go feat(cmdutil): TerminateProcessGroup for graceful termination (#13792) 2023-08-27 22:05:44 +00:00
trace.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00