[fpc-pascal] TProcess execution
Michael Van Canneyt
michael at freepascal.org
Thu Feb 9 09:07:14 CET 2006
On Thu, 9 Feb 2006, Micha Nelissen wrote:
> Jonas Maebe wrote:
> > On 9 feb 2006, at 07:48, Micha Nelissen wrote:
> > > That I should have noticed :-). In unix, the return result of the
> > > 'fpexecve' call is not checked, at least. If it returns, it does
> > > 'halt(127)', so should I check the ExitStatus being 127 ?
> > The reason is that because of the fork/vfork construct these OS'es use,
> > there is no way to report an error to the parent process except by exit
> > codes.
> But how about windows ? I see it raises an exception, so that's the origin of
> Michael's reply I guess. This makes TProcess non-uniform cross-platform :-(.
> Can it be improved ? Either have a documented 127 exitcode (for windows too),
> or raise an exception in unix for exitcode 127 ?
That is what I want to do. The problem is that this is not foolproof, because you
don't know when this exitcode will arrive, and waiting is not an option.
More information about the fpc-pascal