Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-08

TProcess.WaitOnExit on linux doesn't wait

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

The TProcess.WaitOnExit function doesn't wait, but returns immediately. I think the problem is in this line:
Result:=fpWaitPid(Handle,@FExitCode,WNOHANG);

In the old version 0 was passed instead of WNOHANG.

I can't test this on linux now.

Vincent.

Reply by email

Vincent Snijders
to Vincent Snijders
Vincent Snijders wrote 7 lines
Hi, The TProcess.WaitOnExit function doesn't wait, but returns immediately. I think the problem is in this line: Result:=fpWaitPid(Handle,@FExitCode,WNOHANG); In the old version 0 was passed instead of WNOHANG.

Attached patch fixes this problem.

Regards,
Vincent.

Reply by email

Unknown author
to Vincent Snijders
Vincent Snijders wrote 10 lines
Vincent Snijders wrote: > Hi, > > The TProcess.WaitOnExit function doesn't wait, but returns immediately. > I think the problem is in this line: > Result:=fpWaitPid(Handle,@FExitCode,WNOHANG); > > In the old version 0 was passed instead of WNOHANG. Attached patch fixes this problem.

Applied, thanks.

Michael.

Reply by email