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! Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user