diff options
Diffstat (limited to 'pkg/abi')
-rw-r--r-- | pkg/abi/flag.go | 5 | ||||
-rw-r--r-- | pkg/abi/linux/signal.go | 19 |
2 files changed, 15 insertions, 9 deletions
diff --git a/pkg/abi/flag.go b/pkg/abi/flag.go index ec87c9cee..b48757da8 100644 --- a/pkg/abi/flag.go +++ b/pkg/abi/flag.go @@ -43,6 +43,11 @@ func (s FlagSet) Parse(val uint64) string { flags = append(flags, "0x"+strconv.FormatUint(val, 16)) } + if len(flags) == 0 { + // Prefer 0 to an empty string. + return "0x0" + } + return strings.Join(flags, "|") } diff --git a/pkg/abi/linux/signal.go b/pkg/abi/linux/signal.go index bf9bce6ed..395f9f31e 100644 --- a/pkg/abi/linux/signal.go +++ b/pkg/abi/linux/signal.go @@ -165,15 +165,16 @@ const ( // Signal action flags for rt_sigaction(2), from uapi/asm-generic/signal.h const ( - SA_NOCLDSTOP = 0x00000001 - SA_NOCLDWAIT = 0x00000002 - SA_SIGINFO = 0x00000004 - SA_ONSTACK = 0x08000000 - SA_RESTART = 0x10000000 - SA_NODEFER = 0x40000000 - SA_RESTARTHAND = 0x80000000 - SA_NOMASK = SA_NODEFER - SA_ONESHOT = SA_RESTARTHAND + SA_NOCLDSTOP = 0x00000001 + SA_NOCLDWAIT = 0x00000002 + SA_SIGINFO = 0x00000004 + SA_RESTORER = 0x04000000 + SA_ONSTACK = 0x08000000 + SA_RESTART = 0x10000000 + SA_NODEFER = 0x40000000 + SA_RESETHAND = 0x80000000 + SA_NOMASK = SA_NODEFER + SA_ONESHOT = SA_RESETHAND ) // Signal info types. |