Handbook
Glossary
setup-redirection ( process -- process )
Vocabulary
io
.
launcher
.
unix
Inputs
process
an
object
Outputs
process
an
object
Definition
USING:
accessors
io.files.unix
io.launcher
kernel
libc
unix.ffi
;
IN:
io.launcher.unix
:
setup-redirection
( process -- process )
dup
stdin>>
?closed
read-flags
0
redirect
dup
stdout>>
?closed
write-flags
1
redirect
dup
stderr>>
dup
+stdout+
eq?
[
drop
1 2
dup2
io-error
]
[
?closed
write-flags
2
redirect
]
if
;