* fixed WaitProcess in case of SysEintr

This commit is contained in:
Jonas Maebe 2004-01-04 16:24:05 +00:00
parent 3dc9241d0d
commit 592822ba08

View File

@ -242,8 +242,8 @@ begin
repeat repeat
r:=fpWaitPid(Pid,@s,0); r:=fpWaitPid(Pid,@s,0);
if (r=-1) and (fpgeterrno=ESysEIntr) Then if (r=-1) and (fpgeterrno=ESysEIntr) Then
r:=0; r:=0;
until (r<>-1); until (r<>0);
if (r=-1) or (r=0) then // 0 is not a valid return and should never occur (it means status invalid when using WNOHANG) if (r=-1) or (r=0) then // 0 is not a valid return and should never occur (it means status invalid when using WNOHANG)
WaitProcess:=-1 // return -1 to indicate an error. fpwaitpid updated it. WaitProcess:=-1 // return -1 to indicate an error. fpwaitpid updated it.
else else
@ -801,6 +801,7 @@ begin
ClosePipe:=fpclose(textrec(f).handle); ClosePipe:=fpclose(textrec(f).handle);
end; end;
Function AssignPipe(var pipe_in,pipe_out:text):cint; Function AssignPipe(var pipe_in,pipe_out:text):cint;
{ {
Sets up a pair of file variables, which act as a pipe. The first one can Sets up a pair of file variables, which act as a pipe. The first one can
@ -1407,7 +1408,10 @@ End.
{ {
$Log$ $Log$
Revision 1.55 2003-12-31 20:24:25 marco Revision 1.56 2004-01-04 16:24:05 jonas
* fixed WaitProcess in case of SysEintr
Revision 1.55 2003/12/31 20:24:25 marco
* export statfs(pchar) * export statfs(pchar)
Revision 1.54 2003/12/30 15:43:20 marco Revision 1.54 2003/12/30 15:43:20 marco