[Gambas-user] EXEC problem

Rob sourceforge-raindog2 at ...94...
Fri Oct 3 15:18:31 CEST 2003

On Friday 03 October 2003 07:12, Marco Bauer wrote:
> I wanted my gambas program to communicate with a console
> program by executing it with EXEC [ "program" ] FOR READ WRITE
> as MyProcess. The program starts allright but the
> Process_Write event is never called even if there should be
> some output. Is there something I can do about it or is not
> every program able to raise the Write event?

I don't know if this is the problem, but you may need to either 
declare a Process_Error handler (to grab standard error as well) 
or include "2>&1" in your EXEC program call at the end.

Also, if you're using WAIT anywhere in the rest of your program 
while the process is running, you may miss output (at least, 
that's happened to me.)  I meant to report it as a bug but I 
found some workaround I've now forgotten about.


More information about the User mailing list