Handle write() returning EAGAIN by sleeping and retrying.
authorEmil Mikulic <emikulic@gmail.com>
Sun, 10 Mar 2013 16:57:56 +0000 (03:57 +1100)
committerEmil Mikulic <emikulic@gmail.com>
Sun, 10 Mar 2013 17:26:25 +0000 (04:26 +1100)
commit7ec121b337234db6e694a7140f5732df5e3aa34d
tree2089933871414ddbb7e9f5e2156af46e39222bdf
parent82167c1b9ace84dc8f2df347137548e0bb07110c
Handle write() returning EAGAIN by sleeping and retrying.

Before this change, flow control on the tty caused the entire
program to exit.  After the change, we survive fine, and continue to
write to other file descriptors while the tty is blocked.
buftee.c