[Gambas-user] Reading from Process

Benoit Minisini gambas at ...1...
Wed Apr 12 06:39:53 CEST 2006


On Tuesday 11 April 2006 17:21, Peter Moers wrote:
> hi,
> Yet another problem :).
> To control the parallel port I've written a small program in C that
> keeps running waiting for input. Sending text to the process goes good
> with PRINT #$hProc... But when I do printf("blah\n") in C
> Process_Read() isn't fired in Gambas. I tried to run my program in the
> console example and it has the same problem. When I make it crash (no
> error handling at all in my C program) I get the error message but not
> my data right before it ends. In a terminal it does what it has to do.
> It's probably something in the C program. I always end printf with \n
> but that seems not to be enough to fire Process_Read() although the
> program is EXEC ["lptcmd"] FOR READ WRITE.
> I just learned some C to write this program, so if printf() isn't good
> please explain what I should use and why. Maybe one day I'll speak C
> and Gambas fluently :)
>
> regards,
>
> --
> Peter Moers
> peter.moers at ...1417...
> Divides Webdesign - http://www.divides.be
> Startpagina - http://www.321start.be
>

What happens if you call 'fflush(stdout)' just after your printf() ?

-- 
Benoit Minisini





More information about the User mailing list