]> code.delx.au - gnu-emacs/commitdiff
(sys_write): If any bytes were written, return how many.
authorRichard M. Stallman <rms@gnu.org>
Tue, 15 Feb 1994 16:22:49 +0000 (16:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 15 Feb 1994 16:22:49 +0000 (16:22 +0000)
src/sysdep.c

index b7baf4fbb58011f844cddd15195b19e6cf0d826e..0f49fcc6fa4f74128668e07b4c1d7bbd2255a375 100644 (file)
@@ -2754,7 +2754,7 @@ sys_write (fildes, buf, nbyte)
          if (errno == EINTR)
            continue;
          else
-           return (-1);
+           return (bytes_written ? bytes_written : -1);
        }
 
       buf += rtnval;