[Gambas-user] Application_Read() called with no end

Benoît Minisini gambas at ...1...
Tue Aug 20 00:06:14 CEST 2013


Le 19/08/2013 23:56, Tobias Boege a écrit :
> On Mon, 19 Aug 2013, Beno?t Minisini wrote:
>> Le 18/08/2013 21:08, Tobias Boege a ?crit :
>>> Hi Benoit,
>>>
>>> I'm using Application_Read() in a project now and it seems to misbehave. I
>>> have attached a project which mirrors its input from within
>>> Application_Read() using the Debug instruction.
>>>
>>> The problem is, even though the file I am redirecting in is completely read,
>>> Application_Read() is still called with no end:
>>>
>>> $ echo "abc" >/tmp/file
>>> $ gbx3 </tmp/file
>>> MMain.Application_Read.12: abc
>>> MMain.Application_Read.12:
>>> MMain.Application_Read.12:
>>> MMain.Application_Read.12:
>>> ^C
>>>
>>> Maybe there is some feof(stdin) check missing to stop the watch since to
>>> select(2), the file is still readily readable at the EOF. As callback_read()
>>> in gbx_c_file.c seems to be widely shared, I don't want to mess around with
>>> it without knowing the rest of the code.
>>>
>>> Regards,
>>> Tobi
>>>
>>
>> Revision #5811 should fix that.
>>
>> The principle is disabling the read watch as soon as reading a stream
>> fails for any reason.
>>
>> If anything goes wrong after this fix, you will have to wait for two
>> weeks: I leave Paris for holidays!
>>
>
> Works! Bon voyage. (I have to practice French again a little as in two
> weeks, I'll spend my holidays there :-))
>
> Regards,
> Tobi
>

Really? If you go to Paris, tell me so that we can meet.

Regards,

-- 
Benoît Minisini




More information about the User mailing list