os: capture signals

pull/939/head
Justice Suh 2019-07-02 16:13:23 -04:00 committed by Alexander Medvednikov
parent ab20db8e6e
commit 5c42a31b9b
1 changed files with 10 additions and 1 deletions

View File

@ -53,9 +53,14 @@ import const (
SEEK_SET SEEK_SET
SEEK_END SEEK_END
SA_SIGINFO SA_SIGINFO
SIGSEGV
S_IFMT S_IFMT
S_IFDIR S_IFDIR
SIGABRT
SIGFPE
SIGILL
SIGINT
SIGSEGV
SIGTERM
) )
struct C.stat { struct C.stat {
@ -587,6 +592,10 @@ $else {
} }
} }
pub fn signal(signum int, handler voidptr) {
C.signal(signum, handler)
}
fn log(s string) { fn log(s string) {
} }