tailscale/cmd
Aaron Klotz d915e0054c cmd/tailscaled: change Windows service shutdown and add optional event logging
Once a stop request is received and the service updates its status to `svc.StopPending`,
it should continue running *until the shutdown sequence is complete*, and then
return out of `(*ipnService).Execute`, which automatically sends a `svc.Stopped`
notification to Windows.

To make this happen, I changed the loop so that it runs until `doneCh` is
closed, and then returns. I also removed a spurious `svc.StopPending` notification
that the Windows Service Control Manager might be interpreting as a request for
more time to shut down.

Finally, I added some optional logging that sends a record of service notifications
to the Windows event log, allowing us to more easily correlate with any Service
Control Manager errors that are sent to the same log.

Change-Id: I5b596122e5e89c4c655fe747a612a52cb4e8f1e0
Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2022-04-29 15:13:11 -07:00
..
addlicense cmd/addlicense: add command to add licenseheaders to generated code 2021-07-19 15:31:56 -07:00
cloner all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
derper cmd/derper: add --stun-port flag 2022-03-08 07:19:33 -08:00
derpprobe all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
hello all: use strings.Cut even more 2022-03-19 13:02:38 -07:00
mkpkg cmd/mkpkg: use package flag (#4373) 2022-04-07 16:38:33 -04:00
nginx-auth cmd/nginx-auth: maintainer scripts and tailnet checking (#4460) 2022-04-20 13:06:05 -04:00
printdep cmd/printdep: add flag to print out Go toolchain tarball URL 2022-01-06 08:44:17 -08:00
proxy-to-grafana client/tailscale: move/copy all package funcs to new LocalClient type 2022-04-29 13:57:52 -07:00
speedtest cmd: upgrade to ffcli v3 2021-09-14 13:21:55 -07:00
tailscale client/tailscale: move/copy all package funcs to new LocalClient type 2022-04-29 13:57:52 -07:00
tailscaled cmd/tailscaled: change Windows service shutdown and add optional event logging 2022-04-29 15:13:11 -07:00
testcontrol all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
tsshd tempfork: temporarily fork gliderlabs/ssh and x/crypto/ssh 2022-03-26 21:07:01 -07:00