Hello, after some unexpected / unintended prolonged delay due to personal reasons, for which I apologize, attached the v2 of my patches. Basically I have gone a somewhat different route. While working in some of the requested changes, I noticed that there were still some pathological cases that were not covered and fixing that would make things even more convoluted. So, in this version, the return value is calculated (if necessary) strategically right before we return from the function call, thus it cannot be missed and we will always properly signal if data was read from a wait_proc (either directly or indirectly). And instead of messing with got_some_output, we exit the loop when we got some data (directly or indirectly) for our wait_proc if there is no data to be read for this iteration. This leaves the whole function logic alone -- except for this key point. I have addressed the remaining issues, if they still applied. And I have not been able to trigger a single hang with these patches. I appreciate any comments and suggestions. Thanks, again, for all the patience. So long, Matthias -- Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu