Browse Source

* fixed unix version of tprocess.waitonexit (use unix.waitprocess so all
corner cases are properly handled) (mantis #11797)

git-svn-id: trunk@12923 -

Jonas Maebe 16 years ago
parent
commit
7fa0b94f36
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/fcl-process/src/unix/process.inc

+ 2 - 4
packages/fcl-process/src/unix/process.inc

@@ -351,10 +351,8 @@ Var
   R : Dword;
 
 begin
-  R:=fpWaitPid(Handle,pcint(@FExitCode),0);
-  Result:=(R=Handle);
-  If Result then
-    FExitCode:=WExitStatus(FExitCode);
+  fexitcode:=waitprocess(handle);
+  Result:=(fexitcode>=0);
   FRunning:=False;
 end;