Detect that a child is waiting for input

unDEFER via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 24 02:35:21 PST 2016


On Wednesday, 23 November 2016 at 07:18:27 UTC, Shachar Shemesh 
wrote:

> The shell does that for background processes. I think it takes 
> away the TTY from its children, and this way, when they try to 
> read from stdin, they get SIGSTOP from the system.
>
> I'm not sure what the precise mechanism is.
>
> There are flags passed to wait which will cause it to report 
> when a child gets SIGSTOP.
>
> Hope this helps,
> Shachar

So, I have found with strace, this signal is SIGTTIN is special 
signal which sends to _background_ task when it tries to read 
from terminal.

So it is possible such detect when I will write not simple 
pipeProcess, but will write terminal emulator.
Thank you.


More information about the Digitalmars-d mailing list