emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107664: * src/process.c (wait_readin


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107664: * src/process.c (wait_reading_process_output): Handle pty disconnect
Date: Fri, 23 Mar 2012 08:23:14 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107664
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10933
author: Troels Nielsen <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-03-23 08:23:14 -0400
message:
  * src/process.c (wait_reading_process_output): Handle pty disconnect
  by refraining from sending oneself a SIGCHLD.
modified:
  src/ChangeLog
  src/process.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-03-22 07:08:17 +0000
+++ b/src/ChangeLog     2012-03-23 12:23:14 +0000
@@ -1,8 +1,13 @@
+2012-03-23  Troels Nielsen  <address@hidden>  (tiny change)
+
+       * process.c (wait_reading_process_output): Handle pty disconnect
+       by refraining from sending oneself a SIGCHLD (bug#10933).
+
 2012-03-22  Chong Yidong  <address@hidden>
 
        * dispextern.h (struct it): New member string_from_prefix_prop_p.
 
-       * xdisp.c (push_prefix_prop): Renamed from push_display_prop.
+       * xdisp.c (push_prefix_prop): Rename from push_display_prop.
        Mark string as coming from a prefix property.
        (handle_face_prop): Use default face for prefix strings (Bug#4281).
        (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
@@ -14,8 +19,8 @@
 2012-03-20  Eli Zaretskii  <address@hidden>
 
        * w32proc.c (Fw32_set_console_codepage)
-       (Fw32_set_console_output_codepage, Fw32_get_codepage_charset): Doc
-       fixes.
+       (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
+       Doc fixes.
 
 2012-03-20  Chong Yidong  <address@hidden>
 

=== modified file 'src/process.c'
--- a/src/process.c     2012-01-21 10:54:19 +0000
+++ b/src/process.c     2012-03-23 12:23:14 +0000
@@ -4888,15 +4888,20 @@
                 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))
                ;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]