[Gambas-bugtracker] Bug #2310: Gambas Apps have isssues talking to other gambas apps started with exec

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Jul 17 01:42:16 CEST 2021


Comment #8 by Brian G:

Ok, Here is what I have found.

When eof arrives from the other end of the pipe, or gambas gets a signal

then it seems that gambas does not report the eof until the stream buffer is empty, which is correct but
the gambas function lof() immediately reports 0 characters left in the stream... so data goes missing...

I attached a set of apps that run very slow and create a log file on the destop.
The app reads 1 character at a time, ignores lof() and just uses eof().
the sample is doing a read of one character at a time printing the char and the lof() at the time the character is read into the logfile
in a loop, no events.

When the Application_read is enabled then the events seem to stop as soon as the lof becomes zero even if the stream still has data after the eof arrives.

So if all the data arrives at one time, and the other end closes eof happens lof is zero...... no events.... i think. Have not figured out how to debug an app that is running already. 
Maybe I am wrong, But it seems to be a best guess at this point.

I attach the apps and the logfile.


Attachment: MyCat-0.0.45.tar.gz

Attachment: TestWriteReadFromApp-0.0.3.tar.gz

Attachment: catlog.

More information about the Bugtracker mailing list