On 21.03.2013 22:00, Mark Morgan Lloyd wrote:
David Copeland wrote:
As an aside, I have discovered that if you use FpSystem to run a Lazarus
App, the exit code returned is multiplied by 256 (or mishandled
somehow), Eg. 1 => 256, 13 => 3328, etc. However when run using TProcess
the exit code is returned correctly.
Working from memory I think that's by design, it's the way the unix
system calls work.
According to the man page you are right. The man page of "system" refers
to "5 wait" regarding the exitstatus which mentions that you should use
the macro "WEXITSTATUS(status)" to get the exitcode which will return
(according to its implementation) return the upper 8 bits of the status
(which is a 16 bit value).
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus