Unix launcher load fix

db4
Slava Pestov 2008-03-03 18:44:57 -05:00
parent 47a96775d8
commit a203988742
3 changed files with 19 additions and 8 deletions

View File

@ -1,8 +1,9 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.backend io.timeouts system kernel namespaces
strings hashtables sequences assocs combinators vocabs.loader
init threads continuations math ;
USING: io io.backend io.nonblocking io.streams.duplex
io.timeouts system kernel namespaces strings hashtables
sequences assocs combinators vocabs.loader init threads
continuations math ;
IN: io.launcher
! Non-blocking process exit notification facility
@ -141,3 +142,12 @@ TUPLE: process-stream process ;
[ set-process-status ] keep
[ processes get delete-at* drop [ resume ] each ] keep
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 ;

View File

@ -1,9 +1,10 @@
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.backend io.launcher io.unix.backend io.unix.files
io.nonblocking sequences kernel namespaces math system
alien.c-types debugger continuations arrays assocs combinators
unix.process strings threads unix ;
USING: io io.backend io.launcher io.nonblocking io.unix.backend
io.unix.files io.nonblocking sequences kernel namespaces math
system alien.c-types debugger continuations arrays assocs
combinators unix.process strings threads unix
io.unix.launcher.parser ;
IN: io.unix.launcher
! Search unix first

View File

@ -9,7 +9,7 @@ IN: io.unix.launcher.parser
! foo\ bar -- escaping the space
! 'foo bar' -- quotation
! "foo bar" -- quotation
MEMO: 'escaped-char'
MEMO: 'escaped-char' ( -- parser )
"\\" token [ drop t ] satisfy 2seq [ second ] action ;
MEMO: 'quoted-char' ( delimiter -- parser' )