2
This file is part of the Free Component Library (FCL)
3
Copyright (c) 1999-2000 by Peter Vreman
5
Darwin temporary pclose/assignpipe implementation
7
See the file COPYING.FPC, included in this distribution,
8
for details about the copyright.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
**********************************************************************}
18
Function PClose(Var F:file) : cint;
23
fpclose(filerec(F).Handle);
24
{ closed our side, Now wait for the other - this appears to be needed ?? }
25
pl:=@(filerec(f).userdata[2]);
26
pclose := WaitProcess(pl^);
29
Function PClose(Var F:text) :cint;
34
fpclose(Textrec(F).Handle);
35
{ closed our side, Now wait for the other - this appears to be needed ?? }
36
pl:=@(textrec(f).userdata[2]);
37
pclose:= WaitProcess(pl^);
41
// can't have oldfpccall here, linux doesn't need it.
42
Function AssignPipe(var pipe_in,pipe_out:cint):cint; [public, alias : 'FPC_SYSC_ASSIGNPIPE'];
44
Sets up a pair of file variables, which act as a pipe. The first one can
45
be read from, the second one can be written to.
46
If the operation was unsuccesful, linuxerror is set.
50
fdis : array[0..1] of cint;