From: Richard M. Stallman Date: Tue, 15 Feb 1994 16:22:49 +0000 (+0000) Subject: (sys_write): If any bytes were written, return how many. X-Git-Tag: emacs-19.34~9898 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa67090401dce28011053d3e30d6f5bbe7a91a9a;p=emacs.git (sys_write): If any bytes were written, return how many. --- diff --git a/src/sysdep.c b/src/sysdep.c index b7baf4fbb58..0f49fcc6fa4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2754,7 +2754,7 @@ sys_write (fildes, buf, nbyte) if (errno == EINTR) continue; else - return (-1); + return (bytes_written ? bytes_written : -1); } buf += rtnval;