b4n commented on this pull request.
@@ -967,6 +1002,25 @@ static gboolean spawn_read_cb(GIOChannel *channel, GIOCondition condition, gpoin
sc->cb.read(buffer, input_cond | failure_cond, sc->cb_data); } + /* Check for continuous activations with G_IO_IN | G_IO_PRI, without any + data to read and without errors. If detected, switch to timeout source. */ + else if (SPAWN_CHANNEL_GIO_WATCH(sc) && status == G_IO_STATUS_AGAIN) + { + sc->empty_gio_ins++;
@zhekov shouldn't this be reset to 0 on successful read attempts (or decremented, I don't know) to avoid the occasional one to trigger the switch after a long while? Assuming it's not the occasional faulty one that trigger the big issue.
I'm not sure I totally get the implications of the issue, but it seems sad to switch to timeout if the faulty callbacks happens from time to time only -- let's say it happens every minute, it would switch to timeout source after 3h20 nonetheless.