Sign in Join

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

Mailing lists / fpc-devel / 2006-12

TProcess change.

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hello,

I've changed the TProcess.WaitOnExit return type to boolean; A return value of True means success, a return value of False means failure.

This is a conscious break with the old DWord return value, which returned a highly inconsistent, system-dependent return value. The current solution is consistently cross-platform.

I regret if this breaks any code, but you can make the code consistent with older code if you do a

  MyRes:=Ord(WaitOnExit);

This should compile with old and new versions of FPC. (The old return value was useless anyway)

The documentation has been adapted, but is not yet published.

Michael.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Michael Van Canneyt wrote 20 lines
Hello, I've changed the TProcess.WaitOnExit return type to boolean; A return value of True means success, a return value of False means failure. This is a conscious break with the old DWord return value, which returned a highly inconsistent, system-dependent return value. The current solution is consistently cross-platform. I regret if this breaks any code, but you can make the code consistent with older code if you do a MyRes:=Ord(WaitOnExit); This should compile with old and new versions of FPC. (The old return value was useless anyway) The documentation has been adapted, but is not yet published.

I regenerated the docs and noticed that TProcess.WaitOnExit.Result has not been updated:

http://lazarus-ccr.sourceforge.net/docs/fcl/process/tprocess.waitonexit.html

Vincent

Reply by email