diff --git a/packages/fcl-process/src/unix/process.inc b/packages/fcl-process/src/unix/process.inc index 45a453c8e2..ca51e8d592 100644 --- a/packages/fcl-process/src/unix/process.inc +++ b/packages/fcl-process/src/unix/process.inc @@ -42,7 +42,7 @@ end; Function TProcess.GetExitCode : Integer; begin - if wifexited(FExitCode) then + if (Not Running) and wifexited(FExitCode) then Result:=wexitstatus(FExitCode) else Result:=0;