On 24/11/16 17:58, unDEFER wrote:

But really it is not decision.. The program stops not because where is
no input, but because there is other process reading terminal..
It is not that I need..

You can write a wrapper program (let's call it wrp). Wrp can redirect your program's input though itself, and play with the session foreground based on whether there is input pending or not.

This way, your program will stop if the combination of two things happen:
1. It is waiting for input
and
2. There is none

This is, I think, what you want.

Reply via email to