•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileFpipe()                                                              GEMDOS

Syntax

LONG Fpipe( fhandle )
WORD fhandle[2];

Function      Fpipe() creates a pipe named 'SYS$PIPE.xxx' (where 'xxx' is
              a three digit integer) on 'U:\PIPE\' and returns two file
              handles to it, one for reading and one for writing.

Opcode        256 (0x100)

Availability  Available when a 'MiNT' cookie with a version of at least
              0.90 exists.

Parameters    fhandle is a pointer to an array of two WORDs. If the
              functions is successful, fhandle[0] will contain an open
              GEMDOS file handle to the pipe which may be used for reading
              only. fhandle[1] will contain an open GEMDOS file handle to
              the pipe which may be used for writing only.

Binding       pea      fhandle
              move.w   #$100,-(sp)
              trap     #1
              addq.l   #6,sp

Return Value  Fpipe() returns E_OK (0) if successful or a negative GEMDOS
              error code otherwise.

Caveats       No more than 999 pipes created with Fpipe() may be in use at
              once.

Comments      This function is normally used by shells who wish to
              redirect the input and output of their child processes.
              Prior to lauching a child process, the shell redirects its
              input and output (as necessary) to the read and write ends
              of the newly created pipe.