2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
14 static int clear_nonblock_flag (int desc
)
16 int oldflags
= fcntl(desc
, F_GETFL
, 0);
21 oldflags
&= ~O_NONBLOCK
;
23 return fcntl(desc
, F_SETFL
, oldflags
);
26 int pipe(int *pipedes
)
35 pipedes
[0] = open("PIPEFS:__UNNAMED__", O_RDONLY
|O_NONBLOCK
);
38 fdesc
*desc
= __getfdesc(pipedes
[0]);
39 BPTR olddir
= CurrentDir(desc
->fh
);
43 clear_nonblock_flag(pipedes
[0]) != -1 &&
44 ((pipedes
[1] = open("", O_WRONLY
)) != -1)