cworthy/exits/abort.go

15 lines
166 B
Go
Raw Normal View History

2021-08-29 12:27:05 -04:00
package exits
import (
"os"
"syscall"
)
func Abort() {
proc, err := os.FindProcess(os.Getpid())
if err != nil {
panic(err)
}
proc.Signal(syscall.SIGABRT)
}