diff --git a/packages/fcl-process/src/unix/process.inc b/packages/fcl-process/src/unix/process.inc index c1d269e571..82c63d2343 100644 --- a/packages/fcl-process/src/unix/process.inc +++ b/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;