Unix launcher load fix
parent
47a96775d8
commit
a203988742
|
@ -1,8 +1,9 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io io.backend io.timeouts system kernel namespaces
|
USING: io io.backend io.nonblocking io.streams.duplex
|
||||||
strings hashtables sequences assocs combinators vocabs.loader
|
io.timeouts system kernel namespaces strings hashtables
|
||||||
init threads continuations math ;
|
sequences assocs combinators vocabs.loader init threads
|
||||||
|
continuations math ;
|
||||||
IN: io.launcher
|
IN: io.launcher
|
||||||
|
|
||||||
! Non-blocking process exit notification facility
|
! Non-blocking process exit notification facility
|
||||||
|
@ -141,3 +142,12 @@ TUPLE: process-stream process ;
|
||||||
[ set-process-status ] keep
|
[ set-process-status ] keep
|
||||||
[ processes get delete-at* drop [ resume ] each ] keep
|
[ processes get delete-at* drop [ resume ] each ] keep
|
||||||
f swap set-process-handle ;
|
f swap set-process-handle ;
|
||||||
|
|
||||||
|
GENERIC: underlying-handle ( stream -- handle )
|
||||||
|
|
||||||
|
M: port underlying-handle port-handle ;
|
||||||
|
|
||||||
|
M: duplex-stream underlying-handle
|
||||||
|
dup duplex-stream-in underlying-handle
|
||||||
|
swap duplex-stream-out underlying-handle tuck =
|
||||||
|
[ "Invalid duplex stream" throw ] when ;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io io.backend io.launcher io.unix.backend io.unix.files
|
USING: io io.backend io.launcher io.nonblocking io.unix.backend
|
||||||
io.nonblocking sequences kernel namespaces math system
|
io.unix.files io.nonblocking sequences kernel namespaces math
|
||||||
alien.c-types debugger continuations arrays assocs combinators
|
system alien.c-types debugger continuations arrays assocs
|
||||||
unix.process strings threads unix ;
|
combinators unix.process strings threads unix
|
||||||
|
io.unix.launcher.parser ;
|
||||||
IN: io.unix.launcher
|
IN: io.unix.launcher
|
||||||
|
|
||||||
! Search unix first
|
! Search unix first
|
||||||
|
|
|
@ -9,7 +9,7 @@ IN: io.unix.launcher.parser
|
||||||
! foo\ bar -- escaping the space
|
! foo\ bar -- escaping the space
|
||||||
! 'foo bar' -- quotation
|
! 'foo bar' -- quotation
|
||||||
! "foo bar" -- quotation
|
! "foo bar" -- quotation
|
||||||
MEMO: 'escaped-char'
|
MEMO: 'escaped-char' ( -- parser )
|
||||||
"\\" token [ drop t ] satisfy 2seq [ second ] action ;
|
"\\" token [ drop t ] satisfy 2seq [ second ] action ;
|
||||||
|
|
||||||
MEMO: 'quoted-char' ( delimiter -- parser' )
|
MEMO: 'quoted-char' ( delimiter -- parser' )
|
||||||
|
|
Loading…
Reference in New Issue