When the parent's stdio FDs are passed to a child, make them temporarily blocking.
Many programs do not handle non-blocking stdio very well. In particular, man and less have serious problems with this, and since stdout isn't being flushed after each write, the output jumps about on the screen as you page down. Programs that do use non-blocking stdio will set that flag themselves (as node does). This puts the stdio file descriptors into blocking mode before sharing them with the child process, so that one could spawn a vim subprocess, or some other program that depends on blocking IO.
parent
a6bc68a8
Please register or sign in to comment