waiting_stdin


Description:

public bool waiting_stdin ()

Whether the job is blocked reading the stdin we gave it.

The whole descendant tree is walked because a builtin such as read x blocks in the shell with no child to find. A process counts only when it is inside read on fd 0 and that fd is our pipe — comparing the pipe is what keeps a blocked pipeline from reading as a stdin wait.

Linux only, and needs the host pid namespace that build_bubble_args leaves shared.

Returns:

true when something in the job is waiting for send