]> Cypherpunks repositories - gostls13.git/commit
os/signal: split up sleeps waiting for signal
authorIan Lance Taylor <iant@golang.org>
Thu, 12 Sep 2019 00:57:58 +0000 (17:57 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 16 Sep 2019 15:19:42 +0000 (15:19 +0000)
commit4ae25ff1405f9d6b25f40141f42196e8f142f207
tree20ea1b879da523cd2171ceab2a2f9f2211c5a588
parent531f1d50cc15c95822d189d039a9bfe47ff70099
os/signal: split up sleeps waiting for signal

Try to deflake TestNohup.

The kernel will deliver a signal as a thread returns from a syscall.
If the only active thread is sleeping, and the system is busy,
the kernel may not get around to waking up a thread to catch the signal.
Try splitting up the sleep, to give the kernel another change to deliver.

I don't know if this will help, but it seems worth a try.

Fixes #33174

Change-Id: I34b3240af706501ab8538cb25c4846d1d30d7691
Reviewed-on: https://go-review.googlesource.com/c/go/+/194879
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/os/signal/signal_test.go