2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
7 #include <proto/exec.h>
17 /*****************************************************************************
42 ******************************************************************************/
56 (rfcb
= AllocVec(sizeof(fcb
), MEMF_ANY
| MEMF_CLEAR
)) == NULL
||
57 (rdesc
= __alloc_fdesc()) == NULL
||
58 (wfcb
= AllocVec(sizeof(fcb
), MEMF_ANY
| MEMF_CLEAR
)) == NULL
||
59 (wdesc
= __alloc_fdesc()) == NULL
74 if (Pipe("XPIPE:", &reader
, &writer
) != DOSTRUE
) {
75 errno
= IoErr2errno(IoErr());
81 pipedes
[0] = __getfdslot(__getfirstfd(0));
84 rdesc
->fcb
->fh
= reader
;
85 rdesc
->fcb
->flags
= O_RDONLY
;
86 rdesc
->fcb
->opencount
= 1;
87 __setfdesc(pipedes
[0], rdesc
);
89 pipedes
[1] = __getfdslot(__getfirstfd(pipedes
[0]));
92 wdesc
->fcb
->fh
= writer
;
93 wdesc
->fcb
->flags
= O_WRONLY
;
94 wdesc
->fcb
->opencount
= 1;
95 __setfdesc(pipedes
[1], wdesc
);