GNU bug report logs - #10217
24.0.92; Error on quitting Emacs

Previous Next

Package: emacs;

Reported by: Jürgen Bickert <juergen.bickert <at> googlemail.com>

Date: Sun, 4 Dec 2011 23:33:02 UTC

Severity: normal

Merged with 7021, 7022

Found in versions 24.0.50, 23.2, 24.0.92

Fixed in version 24.0.93

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10217 in the body.
You can then email your comments to 10217 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10217; Package emacs. (Sun, 04 Dec 2011 23:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jürgen Bickert <juergen.bickert <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Dec 2011 23:33:02 GMT) Full text and rfc822 format available.

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

From: Jürgen Bickert <juergen.bickert <at> googlemail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92; Error on quitting Emacs
Date: Sun, 4 Dec 2011 23:41:49 +0100
[Message part 1 (text/plain, inline)]
If you evaluate '(start-process "foo" " foo" "ls" 10)' an error occurs
since 10 is not of type sequence. Then if you try to quit emacs the same
error occurs which makes it impossible to quit emacs without killing
it.


In GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.6)
 of 2011-12-04 on cddr
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
( s t a r t - p r o c e s s SPC " f o o " SPC " SPC
f o o " SPC " l s " SPC 1 0 ) C-x C-e q C-x C-c M-x r e p o r t -
<tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
Back to top level.
(No files need saving)
list-processes--refresh: Wrong type argument: sequencep, 10

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug tabulated-list help-mode easymenu view debug time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer loaddefs button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
[Message part 2 (text/html, inline)]

Merged 7021 7022 10217. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Dec 2011 02:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10217; Package emacs. (Tue, 06 Dec 2011 02:49:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Jürgen Bickert <juergen.bickert <at> googlemail.com>
Cc: 10217 <at> debbugs.gnu.org, Nick Roberts <nickrob <at> snap.net.nz>
Subject: Re: bug#10217: 24.0.92; Error on quitting Emacs
Date: Mon, 05 Dec 2011 21:47:52 -0500
Jürgen Bickert wrote:

> If you evaluate '(start-process "foo" " foo" "ls" 10)' an error occurs
> since 10 is not of type sequence. Then if you try to quit emacs the same
> error occurs which makes it impossible to quit emacs without killing
> it.

IIUC, start-process contains code which is supposed to handle this kind
of thing:

  /* If an error occurs and we can't start the process, we want to
     remove it from the process list. 

But it doesn't seem to work. Eg:

(start-process "foo" "foo" "FOO" )

-> (file-error "Searching for program" "no such file or directory" "FOO")

yet

(process-list)

-> (#<process foo>)


(This was previously reported as http://debbugs.gnu.org/7021 ).

It works as it should in Emacs 23.1, but not in 23.2 or later.

By experiment, reverting the 2009-08-13 change to start_process_unwind
("Use pid == -2 to mean no process") seems to fix it, ie:


*** src/process.c   2011-11-28 08:20:58 +0000
--- src/process.c   2011-12-06 02:40:35 +0000
***************
*** 1522,1528 ****
      abort ();
  
    /* Was PROC started successfully?  */
!   if (XPROCESS (proc)->pid == -1)
      remove_process (proc);
  
    return Qnil;
--- 1522,1528 ----
      abort ();
  
    /* Was PROC started successfully?  */
!   if (XPROCESS (proc)->pid <= 0)
      remove_process (proc);
  
    return Qnil;





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10217; Package emacs. (Tue, 06 Dec 2011 03:07:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Jürgen Bickert <juergen.bickert <at> googlemail.com>
Cc: 10217 <at> debbugs.gnu.org, Nick Roberts <nickrob <at> snap.net.nz>
Subject: Re: bug#10217: 24.0.92; Error on quitting Emacs
Date: Mon, 05 Dec 2011 22:05:55 -0500
Glenn Morris wrote:

> By experiment, reverting the 2009-08-13 change to start_process_unwind
> ("Use pid == -2 to mean no process") seems to fix it, ie:

But that can't be a complete solution, since it breaks gdb:

M-x gdb RET gdb -i=mi ls RET

 gdb-init-1: Wrong type argument: processp, nil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10217; Package emacs. (Tue, 06 Dec 2011 03:54:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Jürgen Bickert <juergen.bickert <at> googlemail.com>
Cc: 10217 <at> debbugs.gnu.org, Nick Roberts <nickrob <at> snap.net.nz>
Subject: Re: bug#10217: 24.0.92; Error on quitting Emacs
Date: Mon, 05 Dec 2011 22:53:18 -0500
Glenn Morris wrote:

> Glenn Morris wrote:
>
>> By experiment, reverting the 2009-08-13 change to start_process_unwind
>> ("Use pid == -2 to mean no process") seems to fix it, ie:
>
> But that can't be a complete solution, since it breaks gdb:

The obvious thing, or some variation of it, seems to work:

*** src/process.c 2011-11-28 08:20:58 +0000
--- src/process.c 2011-12-06 03:49:04 +0000
***************
*** 1521,1528 ****
    if (!PROCESSP (proc))
      abort ();
  
!   /* Was PROC started successfully?  */
!   if (XPROCESS (proc)->pid == -1)
      remove_process (proc);
  
    return Qnil;
--- 1521,1529 ----
    if (!PROCESSP (proc))
      abort ();
  
!   /* Was PROC started successfully?
!      -2 is used for a pty with no process, eg for gdb.  */
!   if (XPROCESS (proc)->pid <= 0 && XPROCESS (proc)->pid != -2)
      remove_process (proc);
  
    return Qnil;





Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 06 Dec 2011 08:20:02 GMT) Full text and rfc822 format available.

Notification sent to Jürgen Bickert <juergen.bickert <at> googlemail.com>:
bug acknowledged by developer. (Tue, 06 Dec 2011 08:20:02 GMT) Full text and rfc822 format available.

Message #21 received at 10217-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10217-done <at> debbugs.gnu.org
Subject: Re: bug#10217: 24.0.92; Error on quitting Emacs
Date: Tue, 06 Dec 2011 03:18:59 -0500
Version: 24.0.93

I don't think this can do any harm, so I installed it.
Maybe it should have just been pid == 0 || pid == -1, but I wasn't sure
if other negative pids are being used for anything.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 06 Dec 2011 08:20:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Politz <politza <at> fh-trier.de>:
bug acknowledged by developer. (Tue, 06 Dec 2011 08:20:02 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 06 Dec 2011 08:20:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Politz <politza <at> fh-trier.de>:
bug acknowledged by developer. (Tue, 06 Dec 2011 08:20:03 GMT) Full text and rfc822 format available.

bug Marked as found in versions 23.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Dec 2011 08:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10217; Package emacs. (Tue, 06 Dec 2011 17:42:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: 10217 <at> debbugs.gnu.org
Cc: rgm <at> gnu.org
Subject: Re: bug#10217: 24.0.92; Error on quitting Emacs
Date: Tue, 06 Dec 2011 18:41:09 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Maybe it should have just been pid == 0 || pid == -1, but I wasn't sure
> if other negative pids are being used for anything.

If other special cases of negative pids are used (or introduced later) a
0/-1 check would be safer.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Jan 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 121 days ago.

Previous Next


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