diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go index 7942e78752..291c5f113e 100644 --- a/src/os/signal/signal_test.go +++ b/src/os/signal/signal_test.go @@ -278,3 +278,12 @@ func TestNohup(t *testing.T) { } } } + +// Test that SIGCONT works (issue 8953). +func TestSIGCONT(t *testing.T) { + c := make(chan os.Signal, 1) + Notify(c, syscall.SIGCONT) + defer Stop(c) + syscall.Kill(syscall.Getpid(), syscall.SIGCONT) + waitSig(t, c, syscall.SIGCONT) +} diff --git a/src/runtime/signal_darwin.go b/src/runtime/signal_darwin.go index 142f4e24ce..4a26f3eb08 100644 --- a/src/runtime/signal_darwin.go +++ b/src/runtime/signal_darwin.go @@ -31,7 +31,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_dragonfly.go b/src/runtime/signal_dragonfly.go index d37e11a3ec..f507a07233 100644 --- a/src/runtime/signal_dragonfly.go +++ b/src/runtime/signal_dragonfly.go @@ -29,7 +29,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_freebsd.go b/src/runtime/signal_freebsd.go index bc167c7a9a..7c98cf372b 100644 --- a/src/runtime/signal_freebsd.go +++ b/src/runtime/signal_freebsd.go @@ -31,7 +31,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_nacl.go b/src/runtime/signal_nacl.go index 122648bc33..47930757da 100644 --- a/src/runtime/signal_nacl.go +++ b/src/runtime/signal_nacl.go @@ -29,7 +29,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_netbsd.go b/src/runtime/signal_netbsd.go index d93a450d98..30a3b8e1a9 100644 --- a/src/runtime/signal_netbsd.go +++ b/src/runtime/signal_netbsd.go @@ -29,7 +29,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_openbsd.go b/src/runtime/signal_openbsd.go index f724db9fcd..d1e48c43fc 100644 --- a/src/runtime/signal_openbsd.go +++ b/src/runtime/signal_openbsd.go @@ -31,7 +31,7 @@ var sigtable = [...]sigTabT{ /* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"}, /* 17 */ {0, "SIGSTOP: stop"}, /* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 19 */ {0, "SIGCONT: continue after stop"}, + /* 19 */ {_SigNotify + _SigDefault, "SIGCONT: continue after stop"}, /* 20 */ {_SigNotify, "SIGCHLD: child status has changed"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, diff --git a/src/runtime/signal_solaris.go b/src/runtime/signal_solaris.go index 04b5c9dba6..2cab5b8239 100644 --- a/src/runtime/signal_solaris.go +++ b/src/runtime/signal_solaris.go @@ -35,7 +35,7 @@ var sigtable = [...]sigTabT{ /* 22 */ {_SigNotify, "SIGPOLL: pollable event occured"}, /* 23 */ {_SigNotify + _SigDefault, "SIGSTOP: stop (cannot be caught or ignored)"}, /* 24 */ {_SigNotify + _SigDefault, "SIGTSTP: user stop requested from tty"}, - /* 25 */ {0, "SIGCONT: stopped process has been continued"}, + /* 25 */ {_SigNotify + _SigDefault, "SIGCONT: stopped process has been continued"}, /* 26 */ {_SigNotify + _SigDefault, "SIGTTIN: background tty read attempted"}, /* 27 */ {_SigNotify + _SigDefault, "SIGTTOU: background tty write attempted"}, /* 28 */ {_SigNotify, "SIGVTALRM: virtual timer expired"}, diff --git a/src/runtime/sigtab_linux_generic.go b/src/runtime/sigtab_linux_generic.go index 839d52671a..32c40c4768 100644 --- a/src/runtime/sigtab_linux_generic.go +++ b/src/runtime/sigtab_linux_generic.go @@ -32,7 +32,7 @@ var sigtable = [...]sigTabT{ /* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"}, /* 16 */ {_SigThrow + _SigUnblock, "SIGSTKFLT: stack fault"}, /* 17 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"}, - /* 18 */ {0, "SIGCONT: continue"}, + /* 18 */ {_SigNotify + _SigDefault, "SIGCONT: continue"}, /* 19 */ {0, "SIGSTOP: stop, unblockable"}, /* 20 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, /* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, diff --git a/src/runtime/sigtab_linux_mips64x.go b/src/runtime/sigtab_linux_mips64x.go index 2c0003f72b..dbd50f7b1f 100644 --- a/src/runtime/sigtab_linux_mips64x.go +++ b/src/runtime/sigtab_linux_mips64x.go @@ -38,7 +38,7 @@ var sigtable = [...]sigTabT{ /* 22 */ {_SigNotify, "SIGIO: i/o now possible"}, /* 23 */ {0, "SIGSTOP: stop, unblockable"}, /* 24 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"}, - /* 25 */ {0, "SIGCONT: continue"}, + /* 25 */ {_SigNotify + _SigDefault, "SIGCONT: continue"}, /* 26 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"}, /* 27 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"}, /* 28 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},