Handbook
Glossary
setup-redirection* ( actions attrp argv process -- actions' attrp argv )
Vocabulary
io
.
launcher
.
unix
Inputs
actions
an
object
attrp
an
object
argv
an
object
process
an
object
Outputs
actions'
an
object
attrp
an
object
argv
an
object
Definition
USING:
accessors
io.files.unix
io.launcher
kernel
unix.process
;
IN:
io.launcher.unix
:
setup-redirection*
( actions attrp argv process -- actions' attrp argv )
pickd
[
stdin>>
?closed
read-flags
0
redirect*
]
[
stdout>>
?closed
write-flags
1
redirect*
]
[
stderr>>
dup
+stdout+
eq?
[
drop
1 2
posix_spawn_file_actions_adddup2
check-posix
]
[
?closed
write-flags
2
redirect*
]
if
]
2tri
;