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
|
"stage2: deployment mode" print
|
||||||
] [
|
] [
|
||||||
"debugger" require
|
"debugger" require
|
||||||
|
os unix? [ "debugger.unix" require ] when
|
||||||
"listener" require
|
"listener" require
|
||||||
] if
|
] if
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,9 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: debugger io kernel math prettyprint sequences system
|
USING: accessors debugger io kernel math prettyprint sequences
|
||||||
io.launcher.unix accessors strings ;
|
system unix.signals ;
|
||||||
IN: debugger.unix
|
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. ( n -- )
|
||||||
signal-name [ " (" ")" surround write ] when* ;
|
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.backend io.backend.unix.multiplexers io.buffers io.files
|
||||||
io.ports io.timeouts kernel kernel.private libc locals make math
|
io.ports io.timeouts kernel kernel.private libc locals make math
|
||||||
namespaces sequences summary system threads unix unix.ffi
|
namespaces sequences summary system threads unix unix.ffi
|
||||||
unix.stat unix.types ;
|
unix.signals unix.stat unix.types ;
|
||||||
QUALIFIED: io
|
QUALIFIED: io
|
||||||
IN: io.backend.unix
|
IN: io.backend.unix
|
||||||
|
|
||||||
|
@ -185,10 +185,6 @@ M: stdin cancel-operation
|
||||||
size-read-fd <fd> init-fd <input-port> >>size
|
size-read-fd <fd> init-fd <input-port> >>size
|
||||||
data-read-fd <fd> >>data ;
|
data-read-fd <fd> >>data ;
|
||||||
|
|
||||||
SYMBOL: dispatch-signal-hook
|
|
||||||
|
|
||||||
dispatch-signal-hook [ [ drop ] ] initialize
|
|
||||||
|
|
||||||
: signal-pipe-fd ( -- n )
|
: signal-pipe-fd ( -- n )
|
||||||
OBJ-SIGNAL-PIPE special-object ; inline
|
OBJ-SIGNAL-PIPE special-object ; inline
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
! Copyright (C) 2011 Joe Groff.
|
! Copyright (C) 2011 Joe Groff.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs io.backend.unix kernel namespaces sequences
|
USING: accessors assocs kernel math namespaces sequences threads ;
|
||||||
threads ;
|
|
||||||
IN: unix.signals
|
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
|
<PRIVATE
|
||||||
|
|
||||||
SYMBOL: signal-handlers
|
SYMBOL: signal-handlers
|
||||||
|
|
Loading…
Reference in New Issue