_pipe.c 257 B

12345678910111213141516
  1. #include <lib.h>
  2. #define pipe _pipe
  3. #include <unistd.h>
  4. PUBLIC int pipe(fild)
  5. int fild[2];
  6. {
  7. int k;
  8. k = _callm1(FS, PIPE, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
  9. if (k >= 0) {
  10. fild[0] = _M.m1_i1;
  11. fild[1] = _M.m1_i2;
  12. return(0);
  13. } else
  14. return(k);
  15. }