Re: [fpc-pascal] TProcess execution

2006-02-11 Thread Micha Nelissen
On Wed, 8 Feb 2006 20:30:50 +0100 Micha Nelissen <[EMAIL PROTECTED]> wrote: > How can I know whether a TProcess failed when trying to execute it ? I'm also having problems how to when the process has started or failed. I thought of trying to see whether its output handle was signalled for reading

Re: [fpc-pascal] TProcess execution

2006-02-09 Thread Michael Van Canneyt
On Thu, 9 Feb 2006, Micha Nelissen wrote: On Thu, 9 Feb 2006 08:42:21 +0100 Jonas Maebe <[EMAIL PROTECTED]> wrote: 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. This is not true btw: yo

Re: [fpc-pascal] TProcess execution

2006-02-09 Thread Micha Nelissen
On Thu, 9 Feb 2006 08:42:21 +0100 Jonas Maebe <[EMAIL PROTECTED]> wrote: > 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. This is not true btw: you can use shared memory. Set up a varia

Re: [fpc-pascal] TProcess execution

2006-02-09 Thread Michael Van Canneyt
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

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Michael Van Canneyt
On Thu, 9 Feb 2006, Micha Nelissen wrote: > Michael Van Canneyt wrote: > > > > On Wed, 8 Feb 2006, Micha Nelissen wrote: > > > > > How can I know whether a TProcess failed when trying to execute it ? > > > Running will be false, but I want to distinguish between the file not > > > there / no e

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Micha Nelissen
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 fo

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Jonas Maebe
On 9 feb 2006, at 07:48, Micha Nelissen wrote: How can I know whether a TProcess failed when trying to execute it ? Running will be false, but I want to distinguish between the file not there / no execution permission / etc. and it started running but was done quickly. It should raise an

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Micha Nelissen
Michael Van Canneyt wrote: On Wed, 8 Feb 2006, Micha Nelissen wrote: How can I know whether a TProcess failed when trying to execute it ? Running will be false, but I want to distinguish between the file not there / no execution permission / etc. and it started running but was done quickly.

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Michael Van Canneyt
On Wed, 8 Feb 2006, Micha Nelissen wrote: > Hi, > > How can I know whether a TProcess failed when trying to execute it ? > Running will be false, but I want to distinguish between the file not > there / no execution permission / etc. and it started running but was done > quickly. It should rai

Re: [fpc-pascal] TProcess execution

2006-02-08 Thread Micha Nelissen
On Wed, 8 Feb 2006 20:30:50 +0100 Micha Nelissen <[EMAIL PROTECTED]> wrote: > How can I know whether a TProcess failed when trying to execute it ? > Running will be false, but I want to distinguish between the file not > there / no execution permission / etc. and it started running but was done >