diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index 301833a114..ffa878b326 100644 --- a/basis/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -106,7 +106,6 @@ CONSTANT: default-components "stage2: deployment mode" print ] [ "debugger" require - os unix? [ "debugger.unix" require ] when "listener" require ] if diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 5c5fa8c1cd..f7482bd5dd 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -391,3 +391,5 @@ M: callsite-not-compiled summary drop "Caller not compiled with the optimizing compiler" ; { "threads" "debugger" } "debugger.threads" require-when + +os unix? [ "debugger.unix" require ] when diff --git a/basis/debugger/unix/unix.factor b/basis/debugger/unix/unix.factor index 1f27bc1dbb..62b2969c5a 100644 --- a/basis/debugger/unix/unix.factor +++ b/basis/debugger/unix/unix.factor @@ -1,12 +1,9 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors debugger io kernel math prettyprint sequences -system unix.signals ; +USING: debugger io kernel prettyprint sequences system +unix.signals ; IN: debugger.unix -: signal-name. ( n -- ) - signal-name [ " (" ")" surround write ] when* ; - M: unix signal-error. ( obj -- ) "Unix signal #" write third [ pprint ] [ signal-name. ] bi nl ; diff --git a/basis/io/launcher/unix/unix-tests.factor b/basis/io/launcher/unix/unix-tests.factor index 4608db9719..248a16dc9b 100644 --- a/basis/io/launcher/unix/unix-tests.factor +++ b/basis/io/launcher/unix/unix-tests.factor @@ -1,12 +1,10 @@ -USING: accessors calendar concurrency.promises continuations -debugger.unix destructors io io.backend.unix io.directories -io.encodings.ascii io.encodings.binary io.encodings.utf8 -io.files io.launcher io.launcher.unix io.streams.duplex -io.timeouts kernel libc locals math namespaces sequences threads -tools.test unix.process ; +USING: accessors calendar concurrency.promises destructors io +io.backend.unix io.directories io.encodings.ascii +io.encodings.binary io.encodings.utf8 io.files io.launcher +io.streams.duplex io.timeouts kernel libc locals math namespaces +sequences threads tools.test unix.process unix.signals ; IN: io.launcher.unix.tests - [ { } [ { "touch" "launcher-test-1" } try-process ] unit-test diff --git a/basis/io/launcher/unix/unix.factor b/basis/io/launcher/unix/unix.factor index ad0a76cf67..ce75d91cc2 100644 --- a/basis/io/launcher/unix/unix.factor +++ b/basis/io/launcher/unix/unix.factor @@ -5,6 +5,7 @@ continuations environment fry io.backend io.backend.unix io.files.private io.files.unix io.launcher io.launcher.private io.pathnames io.ports kernel libc math namespaces sequences simple-tokenizer strings system unix unix.ffi unix.process ; +QUALIFIED-WITH: unix.signals sig IN: io.launcher.unix : get-arguments ( process -- seq ) @@ -104,10 +105,8 @@ M: unix (kill-process) ( process -- ) : find-process ( handle -- process ) processes get keys [ handle>> = ] with find nip ; -TUPLE: signal n ; - : code>status ( code -- obj ) - dup WIFSIGNALED [ WTERMSIG signal boa ] [ WEXITSTATUS ] if ; + dup WIFSIGNALED [ WTERMSIG sig:signal boa ] [ WEXITSTATUS ] if ; M: unix (wait-for-processes) ( -- ? ) { int } [ -1 swap WNOHANG waitpid ] with-out-parameters diff --git a/basis/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor index 1273ba6a21..68065aef13 100644 --- a/basis/openssl/libcrypto/libcrypto.factor +++ b/basis/openssl/libcrypto/libcrypto.factor @@ -11,7 +11,7 @@ IN: openssl.libcrypto << "libcrypto" { { [ os windows? ] [ "libcrypto-37.dll" ] } - { [ os macosx? ] [ { "libcrypto.46.dylib" "libcrypto.44.dylib" } find-library-from-list ] } + { [ os macosx? ] [ { "libcrypto.46.dylib" "libcrypto.44.dylib" "libcrypto.dylib" } find-library-from-list ] } { [ os unix? ] [ "libcrypto.so" ] } } cond cdecl add-library >> diff --git a/basis/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor index e1f76347f8..c3a712200a 100644 --- a/basis/openssl/libssl/libssl.factor +++ b/basis/openssl/libssl/libssl.factor @@ -9,7 +9,7 @@ IN: openssl.libssl << "libssl" { { [ os windows? ] [ "libssl-38.dll" ] } - { [ os macosx? ] [ { "libssl.44.dylib" "libssl.42.dylib" } find-library-from-list ] } + { [ os macosx? ] [ { "libssl.44.dylib" "libssl.42.dylib" "libssl.dylib" } find-library-from-list ] } { [ os unix? ] [ "libssl.so" ] } } cond cdecl add-library >> diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index 6e8ebf2d73..6ad4627851 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -59,7 +59,7 @@ delete-staging-images ! { } [ "bunny" shake-and-bake 2559640 small-enough? ] long-unit-test { } [ "bunny" shake-and-bake 2700000 small-enough? ] long-unit-test -{ } [ "gpu.demos.bunny" shake-and-bake 3650000 small-enough? ] long-unit-test +{ } [ "gpu.demos.bunny" shake-and-bake 3660000 small-enough? ] long-unit-test os macosx? [ [ ] [ "webkit-demo" shake-and-bake 600000 small-enough? ] long-unit-test diff --git a/basis/unix/signals/signals.factor b/basis/unix/signals/signals.factor index ccf04fa967..7f888c4db1 100644 --- a/basis/unix/signals/signals.factor +++ b/basis/unix/signals/signals.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2011 Joe Groff. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors assocs kernel math namespaces sequences threads ; +USING: accessors assocs io kernel math namespaces sequences +system threads ; IN: unix.signals CONSTANT: signal-names @@ -21,6 +22,9 @@ 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* ; + SYMBOL: dispatch-signal-hook dispatch-signal-hook [ [ drop ] ] initialize