Browse Source

* adapted second pclose as well

Jonas Maebe 21 years ago
parent
commit
e64c0684a3
1 changed files with 5 additions and 6 deletions
  1. 5 6
      rtl/darwin/unixsysc.inc

+ 5 - 6
rtl/darwin/unixsysc.inc

@@ -19,27 +19,23 @@
 Function PClose(Var F:file) : cint;
 var
   pl : ^cint;
-//  res : cint;
 
 begin
   fpclose(filerec(F).Handle);
 { closed our side, Now wait for the other - this appears to be needed ?? }
   pl:=@(filerec(f).userdata[2]);
   pclose := WaitProcess(pl^);
-//  pclose:=res shr 8;
 end;
 
 Function PClose(Var F:text) :cint;
 var
   pl  : ^longint;
-  res : longint;
 
 begin
   fpclose(Textrec(F).Handle);
 { closed our side, Now wait for the other - this appears to be needed ?? }
   pl:=@(textrec(f).userdata[2]);
-  fpwaitpid(pl^,@res,0);
-  pclose:=res shr 8;
+  pclose:= WaitProcess(pl^);
 end;
 
 
@@ -66,7 +62,10 @@ end;
 
 {
   $Log$
-  Revision 1.2  2004-07-01 18:28:15  jonas
+  Revision 1.3  2004-07-01 18:34:53  jonas
+    * adapted second pclose as well
+
+  Revision 1.2  2004/07/01 18:28:15  jonas
     * fixed returning of proper exit status after pclose
 
   Revision 1.1  2004/01/04 20:05:38  jonas