#include "nsterm.h"
#endif
+/* Work around GCC 4.7.0 bug with strict overflow checking; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
+ These lines can be removed once the GCC bug is fixed. */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
+
Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
It can't hurt. */
else if (nread == -1 && errno == EIO)
{
- /* Clear the descriptor now, so we only raise the signal once. */
- FD_CLR (channel, &input_wait_mask);
- FD_CLR (channel, &non_keyboard_wait_mask);
-
- kill (getpid (), SIGCHLD);
+ /* Don't do anything if only a pty, with no associated
+ process (bug#10933). */
+ if (XPROCESS (proc)->pid != -2) {
+ /* Clear the descriptor now, so we only raise the signal
+ once. */
+ FD_CLR (channel, &input_wait_mask);
+ FD_CLR (channel, &non_keyboard_wait_mask);
+
+ kill (getpid (), SIGCHLD);
+ }
}
#endif /* HAVE_PTYS */
- /* If we can detect process termination, don't consider the process
- gone just because its pipe is closed. */
+ /* If we can detect process termination, don't consider the
+ process gone just because its pipe is closed. */
#ifdef SIGCHLD
else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc))
;
proc_buffered_char[channel] = -1;
}
#ifdef HAVE_GNUTLS
- if (XPROCESS (proc)->gnutls_p)
- nbytes = emacs_gnutls_read (XPROCESS (proc),
- chars + carryover + buffered,
+ if (p->gnutls_p)
+ nbytes = emacs_gnutls_read (p, chars + carryover + buffered,
readmax - buffered);
else
#endif
#endif
{
#ifdef HAVE_GNUTLS
- if (XPROCESS (proc)->gnutls_p)
- written = emacs_gnutls_write (XPROCESS (proc),
- buf, this);
+ if (p->gnutls_p)
+ written = emacs_gnutls_write (p, buf, this);
else
#endif
written = emacs_write (outfd, buf, this);