try-output-process ( command -- )


Vocabulary
io.launcher

Definition
USING: accessors io io.encodings.utf8 io.timeouts kernel ;

IN: io.launcher

: try-output-process ( command -- )
>process +stdout+ >>stderr [ +closed+ or ] change-stdin
utf8 <process-reader*>
[ [ stream-contents ] [ dup (wait-for-process) ] bi* ]
with-timeout 0 = [ 2drop ] [ output-process-error ] if ;