summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/sighandling/sighandling_unsafe.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-12-06 23:08:39 -0800
committergVisor bot <gvisor-bot@google.com>2019-12-06 23:10:15 -0800
commit01eadf51ea54b8f478c49b755d712f11fff2b28c (patch)
tree1329d09a2a6fbd724b13795c87663b3ae49f0b9c /pkg/sentry/sighandling/sighandling_unsafe.go
parent3c2e2f7d12285e6093ecc225e0379fe59e8fd93f (diff)
Bump up Go 1.13 as minimum requirement
PiperOrigin-RevId: 284320186
Diffstat (limited to 'pkg/sentry/sighandling/sighandling_unsafe.go')
-rw-r--r--pkg/sentry/sighandling/sighandling_unsafe.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/pkg/sentry/sighandling/sighandling_unsafe.go b/pkg/sentry/sighandling/sighandling_unsafe.go
index c303435d5..1ebe22d34 100644
--- a/pkg/sentry/sighandling/sighandling_unsafe.go
+++ b/pkg/sentry/sighandling/sighandling_unsafe.go
@@ -15,8 +15,6 @@
package sighandling
import (
- "fmt"
- "runtime"
"syscall"
"unsafe"
@@ -48,27 +46,3 @@ func IgnoreChildStop() error {
return nil
}
-
-// dieFromSignal kills the current process with sig.
-//
-// Preconditions: The default action of sig is termination.
-func dieFromSignal(sig linux.Signal) {
- runtime.LockOSThread()
- defer runtime.UnlockOSThread()
-
- sa := sigaction{handler: linux.SIG_DFL}
- if _, _, e := syscall.RawSyscall6(syscall.SYS_RT_SIGACTION, uintptr(sig), uintptr(unsafe.Pointer(&sa)), 0, linux.SignalSetSize, 0, 0); e != 0 {
- panic(fmt.Sprintf("rt_sigaction failed: %v", e))
- }
-
- set := linux.MakeSignalSet(sig)
- if _, _, e := syscall.RawSyscall6(syscall.SYS_RT_SIGPROCMASK, linux.SIG_UNBLOCK, uintptr(unsafe.Pointer(&set)), 0, linux.SignalSetSize, 0, 0); e != 0 {
- panic(fmt.Sprintf("rt_sigprocmask failed: %v", e))
- }
-
- if err := syscall.Tgkill(syscall.Getpid(), syscall.Gettid(), syscall.Signal(sig)); err != nil {
- panic(fmt.Sprintf("tgkill failed: %v", err))
- }
-
- panic("failed to die")
-}