Le 30/11/2014 19:10, Jussi Lahtinen a écrit :
>> OK, I finally got one error (but 239), even if I replaced "Wait 0.1" by
>> "hProcess.Wait". Let's go back investigating...
>>
>
> I'll make the change in the code. "Good" to see it's not fault in my system.
>
>
> Jussi

At the moment I can get the 239 error, i.e. when running 'echo test' 
through a virtual terminal.

In Linux, you have a system call that tells you how many bytes can be 
read on a file descriptor: ioctl(fd, FIONREAD, ...), and a system call 
(select) that tells you when something can be read on a file descriptor.

Apparently, the system tells me that there is something to read, but the 
ioctl(fd, FIONREAD...) tells me that there is zero bytes!

At the end of the child process, I use that to know if there is still 
something to read from its output. And as I receive zero, I return a 
void string. If the data from 'echo test' arrives before the process 
ends, everything works as expected.

Strange...

-- 
Benoît Minisini

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to