]> gitweb.factorcode.org Git - factor.git/blob - basis/io/pipes/unix/unix.factor
92058e805f14722f4e854505f9412bc9806d34fb
[factor.git] / basis / io / pipes / unix / unix.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.data system kernel unix math sequences
4 io.backend.unix io.ports libc specialized-arrays accessors unix.ffi ;
5 QUALIFIED: io.pipes
6 SPECIALIZED-ARRAY: int
7 IN: io.pipes.unix
8
9 M: unix io.pipes:(pipe) ( -- pair )
10     2 int <c-array>
11     [ pipe io-error ]
12     [ first2 [ <fd> init-fd ] bi@ io.pipes:pipe boa ] bi ;