GNU bug report logs - #14297
24.3.50; emacs subprocesses don't exit on "exit"

Previous Next

Package: emacs;

Reported by: Vitalie Spinu <spinuvit <at> gmail.com>

Date: Sun, 28 Apr 2013 12:21:01 UTC

Severity: important

Tags: moreinfo

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 14297 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spinuvit <at> gmail.com, 14297 <at> debbugs.gnu.org
Subject: Re: bug#14297: 24.3.50; emacs subprocesses don't exit on "exit"
Date: Mon, 13 May 2013 09:58:17 -0700
On 05/13/13 08:59, Eli Zaretskii wrote:
> So I'm not sure this is the same problem.

I agree.  I brought up the issue because the question
arose as to how (process-live-p proc) is connected to
the window toolkit.

It's conceivable, for example, that a buggy Gtk plugin
is doing a waitpid (-1, ...), which would mess up
Emacs greatly (and would also mess up other applications,
the symptoms observed here).

Perhaps we should apply something like the following patch,
to help detect these situations better?

=== modified file 'src/sysdep.c'
--- src/sysdep.c	2013-03-24 12:59:45 +0000
+++ src/sysdep.c	2013-05-13 16:56:59 +0000
@@ -315,7 +315,8 @@ get_child_status (pid_t child, int *stat
 void
 wait_for_termination (pid_t child, int *status, bool interruptible)
 {
-  get_child_status (child, status, 0, interruptible);
+  if (get_child_status (child, status, 0, interruptible) < 0)
+    emacs_abort ();
 }
 
 /* Report whether the subprocess with process id CHILD has changed status.
@@ -330,7 +331,10 @@ wait_for_termination (pid_t child, int *
 pid_t
 child_status_changed (pid_t child, int *status, int options)
 {
-  return get_child_status (child, status, WNOHANG | options, 0);
+  pid_t p = get_child_status (child, status, WNOHANG | options, 0);
+  if (p < 0)
+    emacs_abort ();
+  return p;
 }
 
 /*






This bug report was last modified 9 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.