emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111150: * sysdep.c (get_child_status


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111150: * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
Date: Fri, 07 Dec 2012 09:53:17 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111150
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2012-12-07 09:53:17 -0800
message:
  * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
  
  This will cause a production Emacs to dump core instead of
  infinite-looping.
modified:
  src/ChangeLog
  src/sysdep.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-12-07 08:13:49 +0000
+++ b/src/ChangeLog     2012-12-07 17:53:17 +0000
@@ -1,3 +1,9 @@
+2012-12-07  Paul Eggert  <address@hidden>
+
+       * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
+       This will cause a production Emacs to dump core instead of
+       infinite-looping.
+
 2012-12-07  Dmitry Antipov  <address@hidden>
 
        * frame.c (make_frame): Do not set window's buffer to t.

=== modified file 'src/sysdep.c'
--- a/src/sysdep.c      2012-12-03 21:42:12 +0000
+++ b/src/sysdep.c      2012-12-07 17:53:17 +0000
@@ -289,9 +289,12 @@
 
   while ((pid = waitpid (child, status, options)) < 0)
     {
-      /* CHILD must be a child process that has not been reaped, and
-        STATUS and OPTIONS must be valid.  */
-      eassert (errno == EINTR);
+      /* Check that CHILD is a child process that has not been reaped,
+        and that STATUS and OPTIONS are valid.  Otherwise abort,
+        as continuing after this internal error could cause Emacs to
+        become confused and kill innocent-victim processes.  */
+      if (errno != EINTR)
+       emacs_abort ();
 
       /* Note: the MS-Windows emulation of waitpid calls QUIT
         internally.  */


reply via email to

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