factor/basis/io/pipes/unix/unix.factor

13 lines
429 B
Factor
Raw Normal View History

! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.data system kernel unix math sequences
io.backend.unix io.ports libc specialized-arrays accessors unix.ffi ;
QUALIFIED: io.pipes
SPECIALIZED-ARRAY: int
IN: io.pipes.unix
2017-12-29 02:31:02 -05:00
M: unix io.pipes::(pipe) ( -- pair )
2 int <c-array>
[ pipe io-error ]
2017-12-29 02:31:02 -05:00
[ first2 [ <fd> init-fd ] bi@ io.pipes::pipe boa ] bi ;