descriptor into non-blocking mode temporarily, and correctly handle returns of EAGAIN from write(). This should fix unix-plink-stdout-nonblock, while avoiding EAGAIN turning up where we aren't expecting it. [originally from svn r7748]