mirror of
https://github.com/tailscale/tailscale.git
synced 2026-02-18 22:56:17 -05:00
Updates rotateLocked so that we hold the activeStderrWriteForTest write lock around the dup2Stderr call, rather than acquiring it only after dup2 was already compelete. This ensures no stderrWriteForTest calls can race with the dup2 syscall. The now unused waitIdleStderrForTest has been removed. On macOS, dup2 and write on the same file descriptor are not atomic with respect to each other, when rotateLocked called dup2Stderr to redirect the stderr fd to a new file, concurrent goroutines calling stderrWriteForTest could observe the fd in a transiently invalid state, resulting in the bad file descripter. Fixes tailscale/corp#36953 Signed-off-by: James Scott <jim@tailscale.com>
Tailscale Logs Service
This github repository contains libraries, documentation, and examples for working with the public API of the tailscale logs service.
For a very quick introduction to the core features, read the API docs and peruse the logs reprocessing example.
For more information, write to info@tailscale.io.