tailscale/tstest
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
..
archtest all: use cibuild.On 2022-03-18 15:19:26 -07:00
integration cmd/tailscaled: change Windows service shutdown and add optional event logging 2022-04-29 15:13:11 -07:00
iosdeps tstest/iosdeps: add test for forbidden iOS dependencies 2022-04-20 12:30:23 -07:00
natlab all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
staticcheck all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
allocs.go util/testingutil: new package with MinAllocsPerRun 2021-10-28 12:48:37 -07:00
clock.go tstest/natlab: add a stateful firewall. 2020-07-11 05:17:38 +00:00
log_test.go tstest: rename LogListener to LogLineTracker 2020-09-04 08:09:56 -07:00
log.go all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
resource.go net/dns{,/resolver}: refactor DNS forwarder, send out of right link on macOS/iOS 2021-06-23 16:04:10 -07:00
tstest.go tstest: add WaitFor helper 2021-04-29 14:43:46 -07:00