Make docker use the signal pkg with strings
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
This commit is contained in:
parent
16d0b6b959
commit
2433bf6372
5 changed files with 36 additions and 36 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
func CatchAll(sigc chan os.Signal) {
|
func CatchAll(sigc chan os.Signal) {
|
||||||
handledSigs := []os.Signal{}
|
handledSigs := []os.Signal{}
|
||||||
for _, s := range signalMap {
|
for _, s := range SignalMap {
|
||||||
handledSigs = append(handledSigs, s)
|
handledSigs = append(handledSigs, s)
|
||||||
}
|
}
|
||||||
signal.Notify(sigc, handledSigs...)
|
signal.Notify(sigc, handledSigs...)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
var signalMap = map[string]syscall.Signal{
|
var SignalMap = map[string]syscall.Signal{
|
||||||
"ABRT": syscall.SIGABRT,
|
"ABRT": syscall.SIGABRT,
|
||||||
"ALRM": syscall.SIGALRM,
|
"ALRM": syscall.SIGALRM,
|
||||||
"BUG": syscall.SIGBUS,
|
"BUG": syscall.SIGBUS,
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
var signalMap = map[string]syscall.Signal{
|
var SignalMap = map[string]syscall.Signal{
|
||||||
"ABRT": syscall.SIGABRT,
|
"ABRT": syscall.SIGABRT,
|
||||||
"ALRM": syscall.SIGALRM,
|
"ALRM": syscall.SIGALRM,
|
||||||
"BUF": syscall.SIGBUS,
|
"BUF": syscall.SIGBUS,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
var signalMap = map[string]syscall.Signal{
|
var SignalMap = map[string]syscall.Signal{
|
||||||
"ABRT": syscall.SIGABRT,
|
"ABRT": syscall.SIGABRT,
|
||||||
"ALRM": syscall.SIGALRM,
|
"ALRM": syscall.SIGALRM,
|
||||||
"BUS": syscall.SIGBUS,
|
"BUS": syscall.SIGBUS,
|
||||||
|
|
|
@ -6,4 +6,4 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
var signalMap = map[string]syscall.Signal{}
|
var SignalMap = map[string]syscall.Signal{}
|
||||||
|
|
Loading…
Reference in a new issue