]> gitweb.factorcode.org Git - factor.git/blob - basis/io/pipes/unix/unix.factor
acf8b787edd4c2fbfcf132344e39a5cff24ef02e
[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: system kernel unix math sequences qualified
4 io.backend.unix io.ports specialized-arrays.int accessors ;
5 IN: io.pipes.unix
6 QUALIFIED: io.pipes
7
8 M: unix io.pipes:(pipe) ( -- pair )
9     2 <int-array>
10     [ underlying>> pipe io-error ]
11     [ first2 [ <fd> init-fd ] bi@ io.pipes:pipe boa ] bi ;