Skip to content

Commit

Permalink
dcrdtest: call os.Process.Wait during abnormal shutdown detection
Browse files Browse the repository at this point in the history
exec.Cmd.Wait is not safe to call concurrently.
  • Loading branch information
jrick committed Apr 4, 2024
1 parent 058929f commit 738c759
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcrdtest/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ func (n *node) start(ctx context.Context) error {

earlyShutdown := make(chan error, 1)
go func() {
earlyShutdown <- cmd.Wait()
_, err := cmd.Process.Wait()
earlyShutdown <- err
}()

// Read the RPC and P2P addresses.
Expand Down

0 comments on commit 738c759

Please sign in to comment.