basis: Fix bootstrap to display unix signals instead of "Error in print-error!"
parent
bf719c4cca
commit
4faab8a00f
|
@ -82,6 +82,7 @@ CONSTANT: default-components
|
|||
"stage2: deployment mode" print
|
||||
] [
|
||||
"debugger" require
|
||||
os unix? [ "debugger.unix" require ] when
|
||||
"listener" require
|
||||
] if
|
||||
|
||||
|
|
|
@ -1,25 +1,9 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: debugger io kernel math prettyprint sequences system
|
||||
io.launcher.unix accessors strings ;
|
||||
USING: accessors debugger io kernel math prettyprint sequences
|
||||
system unix.signals ;
|
||||
IN: debugger.unix
|
||||
|
||||
CONSTANT: signal-names
|
||||
{
|
||||
"SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGTRAP" "SIGABRT"
|
||||
"SIGEMT" "SIGFPE" "SIGKILL" "SIGBUS" "SIGSEGV" "SIGSYS"
|
||||
"SIGPIPE" "SIGALRM" "SIGTERM" "SIGURG" "SIGSTOP" "SIGTSIP"
|
||||
"SIGCONT" "SIGCHLD" "SIGTTIN" "SIGTTOU" "SIGIO" "SIGXCPU"
|
||||
"SIGXFSZ" "SIGVTALRM" "SIGPROF" "SIGWINCH" "SIGINFO"
|
||||
"SIGUSR1" "SIGUSR2"
|
||||
}
|
||||
|
||||
GENERIC: signal-name ( obj -- str/f )
|
||||
|
||||
M: signal signal-name n>> signal-name ;
|
||||
|
||||
M: integer signal-name ( n -- str/f ) 1 - signal-names ?nth ;
|
||||
|
||||
: signal-name. ( n -- )
|
||||
signal-name [ " (" ")" surround write ] when* ;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ classes.struct combinators destructors destructors.private fry
|
|||
io.backend io.backend.unix.multiplexers io.buffers io.files
|
||||
io.ports io.timeouts kernel kernel.private libc locals make math
|
||||
namespaces sequences summary system threads unix unix.ffi
|
||||
unix.stat unix.types ;
|
||||
unix.signals unix.stat unix.types ;
|
||||
QUALIFIED: io
|
||||
IN: io.backend.unix
|
||||
|
||||
|
@ -185,10 +185,6 @@ M: stdin cancel-operation
|
|||
size-read-fd <fd> init-fd <input-port> >>size
|
||||
data-read-fd <fd> >>data ;
|
||||
|
||||
SYMBOL: dispatch-signal-hook
|
||||
|
||||
dispatch-signal-hook [ [ drop ] ] initialize
|
||||
|
||||
: signal-pipe-fd ( -- n )
|
||||
OBJ-SIGNAL-PIPE special-object ; inline
|
||||
|
||||
|
|
|
@ -1,9 +1,30 @@
|
|||
! Copyright (C) 2011 Joe Groff.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: assocs io.backend.unix kernel namespaces sequences
|
||||
threads ;
|
||||
USING: accessors assocs kernel math namespaces sequences threads ;
|
||||
IN: unix.signals
|
||||
|
||||
CONSTANT: signal-names
|
||||
{
|
||||
"SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGTRAP" "SIGABRT"
|
||||
"SIGEMT" "SIGFPE" "SIGKILL" "SIGBUS" "SIGSEGV" "SIGSYS"
|
||||
"SIGPIPE" "SIGALRM" "SIGTERM" "SIGURG" "SIGSTOP" "SIGTSIP"
|
||||
"SIGCONT" "SIGCHLD" "SIGTTIN" "SIGTTOU" "SIGIO" "SIGXCPU"
|
||||
"SIGXFSZ" "SIGVTALRM" "SIGPROF" "SIGWINCH" "SIGINFO"
|
||||
"SIGUSR1" "SIGUSR2"
|
||||
}
|
||||
|
||||
TUPLE: signal n ;
|
||||
|
||||
GENERIC: signal-name ( obj -- str/f )
|
||||
|
||||
M: signal signal-name n>> signal-name ;
|
||||
|
||||
M: integer signal-name ( n -- str/f ) 1 - signal-names ?nth ;
|
||||
|
||||
SYMBOL: dispatch-signal-hook
|
||||
|
||||
dispatch-signal-hook [ [ drop ] ] initialize
|
||||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOL: signal-handlers
|
||||
|
|
Loading…
Reference in New Issue