Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prefer os.Process.Signal to syscall.Kill
This helps protect us from a potential (but extremely rare) race condition where 1. the process exits terminates 2. its PID gets reaped in the Wait call 3. a new process with the same PID gets spawned before our signal actually gets sent. This uses the higher-level os.Process API directly, which has some synchronization in-place to prevent Wait and Signal from racing.
- Loading branch information