From: Paul Eggert Date: Wed, 13 Apr 2011 19:23:45 +0000 (-0700) Subject: * process.c (send_process): Count partial writes as successes. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~283^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=086e8c477d4342c8e718f9bb811da0b1a6e1e946;p=emacs.git * process.c (send_process): Count partial writes as successes. See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html --- diff --git a/src/ChangeLog b/src/ChangeLog index 73d27f26d45..9aa58fb0884 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-13 Paul Eggert + * process.c (send_process): Count partial writes as successes. + See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html + emacs_write: Return size_t, not ssize_t, to avoid overflow issues. * gnutls.c, gnutls.h (emacs_gnutls_write): Return size_t, not ssize_t. * sysdep.c, lisp.h (emacs_write): Likewise. diff --git a/src/process.c b/src/process.c index 2eed7b4654f..2c3124f429c 100644 --- a/src/process.c +++ b/src/process.c @@ -5396,7 +5396,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, else #endif written = emacs_write (outfd, buf, this); - rv = (written == this ? 0 : -1); + rv = (written ? 0 : -1); #ifdef ADAPTIVE_READ_BUFFERING if (p->read_output_delay > 0 && p->adaptive_read_buffering == 1)