* bug#10217: 24.0.92; Error on quitting Emacs
@ 2011-12-04 22:41 Jürgen Bickert
2011-12-06 2:47 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Jürgen Bickert @ 2011-12-04 22:41 UTC (permalink / raw)
To: 10217
[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]
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)
[-- Attachment #2: Type: text/html, Size: 2840 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10217: 24.0.92; Error on quitting Emacs
2011-12-04 22:41 bug#10217: 24.0.92; Error on quitting Emacs Jürgen Bickert
@ 2011-12-06 2:47 ` Glenn Morris
2011-12-06 3:05 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-12-06 2:47 UTC (permalink / raw)
To: Jürgen Bickert; +Cc: 10217, Nick Roberts
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10217: 24.0.92; Error on quitting Emacs
2011-12-06 2:47 ` Glenn Morris
@ 2011-12-06 3:05 ` Glenn Morris
2011-12-06 3:53 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-12-06 3:05 UTC (permalink / raw)
To: Jürgen Bickert; +Cc: 10217, Nick Roberts
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10217: 24.0.92; Error on quitting Emacs
2011-12-06 3:05 ` Glenn Morris
@ 2011-12-06 3:53 ` Glenn Morris
2011-12-06 8:18 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-12-06 3:53 UTC (permalink / raw)
To: Jürgen Bickert; +Cc: 10217, Nick Roberts
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10217: 24.0.92; Error on quitting Emacs
2011-12-06 3:53 ` Glenn Morris
@ 2011-12-06 8:18 ` Glenn Morris
2011-12-06 17:41 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-12-06 8:18 UTC (permalink / raw)
To: 10217-done
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10217: 24.0.92; Error on quitting Emacs
2011-12-06 8:18 ` Glenn Morris
@ 2011-12-06 17:41 ` Andreas Schwab
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2011-12-06 17:41 UTC (permalink / raw)
To: 10217
Glenn Morris <rgm@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-06 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-04 22:41 bug#10217: 24.0.92; Error on quitting Emacs Jürgen Bickert
2011-12-06 2:47 ` Glenn Morris
2011-12-06 3:05 ` Glenn Morris
2011-12-06 3:53 ` Glenn Morris
2011-12-06 8:18 ` Glenn Morris
2011-12-06 17:41 ` Andreas Schwab
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).