When the parent's stdio FDs are passed to a child, make them temporarily blocking.
authorisaacs <i@izs.me>
Tue, 3 Aug 2010 22:57:44 +0000 (15:57 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Wed, 4 Aug 2010 01:11:43 +0000 (18:11 -0700)
commite9aacd40c68e33bfeef24a396d63e42ccbb3b054
tree7fcd14f0c0a11c36881bd344280b4e2547d9f850
parenta6bc68a83beda7609330e525a73b7b227a1b9207
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.
src/node_child_process.cc