]> Cypherpunks repositories - gostls13.git/commit
os/signal: reset SIGURG in TestSignal
authorChaoqun Han <hanssccv@gmail.com>
Tue, 23 Nov 2021 14:05:40 +0000 (22:05 +0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 23 Nov 2021 21:39:32 +0000 (21:39 +0000)
commite3eaedb5cf623d0836533573db4140749da42768
treeda0c3f28541b4060b475a23cd8f37294e925ddb6
parent0f64c21d90c7017df4f199a5852d60d4b474c03c
os/signal: reset SIGURG in TestSignal

Accepting SIGURG signals could cause SIGURG to take up the entire
channel buffer.

Enhance the stability of test cases by:
1.  Stop accepting the SIGURG signal by adding  ‘Reset(sys call.SIGURG)’
2.  Close the c1 chan by adding ‘defer Stop(c1)’ (Another bug, NOT this bug)

Fixes #49724

Change-Id: I909a9993f0f6dd109c15e48a861683b87dfc4ab3
Reviewed-on: https://go-review.googlesource.com/c/go/+/366514
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
src/os/signal/signal_test.go