home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / SYS / PIPE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  373 b   |  19 lines

  1. /* sys/pipe.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <os2emx.h>
  5. #include "syscalls.h"
  6.  
  7. int __pipe (int *two_handles, int pipe_size)
  8. {
  9.   ULONG rc;
  10.  
  11.   rc = DosCreatePipe (&two_handles[0], &two_handles[1], pipe_size);
  12.   if (rc != 0)
  13.     {
  14.       _sys_set_errno (rc);
  15.       return (-1);
  16.     }
  17.   return (0);
  18. }
  19.