test: reset a signal handler before closing a signal channel

goroutine 5 [running]:
os/signal.process(0x10e21c0, 0xc00050c280)
        third_party/go/gc/src/os/signal/signal.go:227 +0x164
os/signal.loop()
        third_party/go/gc/src/os/signal/signal_unix.go:23 +0x3e
created by os/signal.init.0
        third_party/go/gc/src/os/signal/signal_unix.go:29 +0x41

PiperOrigin-RevId: 264518530
This commit is contained in:
Andrei Vagin 2019-08-20 19:09:45 -07:00 committed by gVisor bot
parent 8b7e7a04d6
commit 7609da6cb9
1 changed files with 1 additions and 0 deletions

View File

@ -280,6 +280,7 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
if err = cmd.Run(); err != nil {
t.Errorf("test %q exited with status %v, want 0", tc.FullName(), err)
}
signal.Stop(sig)
close(sig)
}