summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs/controlknobs.go
diff options
context:
space:
mode:
authorAaron Klotz <aaron@tailscale.com>2023-11-03 13:56:46 -0600
committerAaron Klotz <aaron@tailscale.com>2023-11-30 14:04:27 -0800
commitdb39a43f063a73525b6ea93006d888b53e692846 (patch)
tree781a4879defcad3fd3c044d4b2c47c7870a3b1a5 /control/controlknobs/controlknobs.go
parent59d1077e2853e1964ae27a3158eaa80e01d690ee (diff)
downloadtailscale-db39a43f063a73525b6ea93006d888b53e692846.tar.xz
tailscale-db39a43f063a73525b6ea93006d888b53e692846.zip
util/winutil: add support for restarting Windows processes in specific sessions
This PR is all about adding functionality that will enable the installer's upgrade sequence to terminate processes belonging to the previous version, and then subsequently restart instances belonging to the new version within the session(s) corresponding to the processes that were killed. There are multiple parts to this: * We add support for the Restart Manager APIs, which allow us to query the OS for a list of processes locking specific files; * We add the RestartableProcess and RestartableProcesses types that query additional information about the running processes that will allow us to correctly restart them in the future. These types also provide the ability to terminate the processes. * We add the StartProcessInSession family of APIs that permit us to create new processes within specific sessions. This is needed in order to properly attach a new GUI process to the same RDP session and desktop that its previously-terminated counterpart would have been running in. * I tweaked the winutil token APIs again. * A lot of this stuff is pretty hard to test without a very elaborate harness, but I added a unit test for the most complicated part (though it requires LocalSystem to run). Updates https://github.com/tailscale/corp/issues/13998 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
0 files changed, 0 insertions, 0 deletions