
This mainly fixes Linux vs generic Unix differences, with some differences between Darwin and Freebsd (which are close bit not identical). Should make fixing for other Unix platforms easier. Note there are not yet `runc` equivalents for these platforms; my current use case is image manipulation for the `moby` tool. However there is interest in OCI runtime ports for both platforms. Current status is that MacOS can build and run `ctr`, `dist` and `containerd` and some operations are supported. FreeBSD 11 still needs some more fixes to continuity for extended attributes. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
46 lines
978 B
Go
46 lines
978 B
Go
package main
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
var signalMap = map[string]syscall.Signal{
|
|
"ABRT": unix.SIGABRT,
|
|
"ALRM": unix.SIGALRM,
|
|
"BUS": unix.SIGBUS,
|
|
"CHLD": unix.SIGCHLD,
|
|
"CLD": unix.SIGCLD,
|
|
"CONT": unix.SIGCONT,
|
|
"FPE": unix.SIGFPE,
|
|
"HUP": unix.SIGHUP,
|
|
"ILL": unix.SIGILL,
|
|
"INT": unix.SIGINT,
|
|
"IO": unix.SIGIO,
|
|
"IOT": unix.SIGIOT,
|
|
"KILL": unix.SIGKILL,
|
|
"PIPE": unix.SIGPIPE,
|
|
"POLL": unix.SIGPOLL,
|
|
"PROF": unix.SIGPROF,
|
|
"PWR": unix.SIGPWR,
|
|
"QUIT": unix.SIGQUIT,
|
|
"SEGV": unix.SIGSEGV,
|
|
"STKFLT": unix.SIGSTKFLT,
|
|
"STOP": unix.SIGSTOP,
|
|
"SYS": unix.SIGSYS,
|
|
"TERM": unix.SIGTERM,
|
|
"TRAP": unix.SIGTRAP,
|
|
"TSTP": unix.SIGTSTP,
|
|
"TTIN": unix.SIGTTIN,
|
|
"TTOU": unix.SIGTTOU,
|
|
"UNUSED": unix.SIGUNUSED,
|
|
"URG": unix.SIGURG,
|
|
"USR1": unix.SIGUSR1,
|
|
"USR2": unix.SIGUSR2,
|
|
"VTALRM": unix.SIGVTALRM,
|
|
"WINCH": unix.SIGWINCH,
|
|
"XCPU": unix.SIGXCPU,
|
|
"XFSZ": unix.SIGXFSZ,
|
|
}
|