all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: grischka <grishka@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Functions in kill-emacs-hook aren't run if emacs gets killed with	SIGTERM
Date: Sat, 24 Jan 2009 15:16:42 +0100	[thread overview]
Message-ID: <497B22CA.4080203@gmx.de> (raw)
In-Reply-To: <uy6x1tz24.fsf@gnu.org>

Eli Zaretskii wrote:
>>> On balance, I would leave things as they are, i.e. don't run
>>> kill-emacs-hook when we get SIGTERM.  After all, we are being killed,
>>> so only the minimum necessary cleanup should be in order.
>>
>> That seems to me like a quite twisted argumentation to say that
>> 	"kill-emacs-hook"
>> should NOT be run because
>> 	"After all, we are being killed ...".
> 
> That's a perfect example of twisting someone else's argument by taking
> it out of context and removing a few words.

Thanks.

>> Btw, with SIGINT emacs (GTK) quits like this
>> 	Fatal Error (6)Abort
>> Is this a bug?
> 
> If that's the result of "kill -INT" from the shell prompt, then Emacs
> should shut down.  Sounds like somewhere along the shutdown procedure
> it hits a call to `abort'.  A backtrace would help.
> 

Happens when pressing Ctrl-C after starting emacs at a xterm prompt.
IIRC to reproduce it it suffices to call 'pp' in a kill-emacs-hook.

Breakpoint 1, abort () at emacs.c:432
432	  kill (getpid (), SIGABRT);
(gdb) bt
#0  abort () at emacs.c:432
#1  0x0817db15 in Fsignal (error_symbol=138082153, data=155611005)
     at eval.c:1651
#2  0x0817dc38 in xsignal (error_symbol=138082153, data=155611005)
     at eval.c:1750
#3  0x0817dfde in xsignal3 (error_symbol=138082153, arg1=154631035, arg2=192,
     arg3=200) at eval.c:1781
#4  0x081a9a38 in scan_lists (from=25, count=1, depth=-2, sexpflag=0)
     at syntax.c:2805
#5  0x0817d833 in Ffuncall (nargs=4, args=0xbfa56350) at eval.c:3050
#6  0x081b2fd8 in Fbyte_code (bytestr=136910211, vector=136910228,
     maxdepth=<value optimized out>) at bytecode.c:678
#7  0x0817f683 in funcall_lambda (fun=136910164, nargs=1,
     arg_vector=0xbfa56498) at eval.c:3231
#8  0x0817d543 in Ffuncall (nargs=2, args=0xbfa56494) at eval.c:3101
#9  0x081b2fd8 in Fbyte_code (bytestr=154612923, vector=139722500,
     maxdepth=<value optimized out>) at bytecode.c:678
#10 0x0817f22c in Feval (form=155612917) at eval.c:2381
#11 0x0817fde1 in internal_lisp_condition_case (var=154765089,
     bodyform=155612917, handlers=155612869) at eval.c:1456
#12 0x081b3912 in Fbyte_code (bytestr=154613083, vector=154925740,
     maxdepth=<value optimized out>) at bytecode.c:868
#13 0x0817f683 in funcall_lambda (fun=154855964, nargs=0,
---Type <return> to continue, or q <return> to quit---
     arg_vector=0xbfa567c4) at eval.c:3231
#14 0x0817d543 in Ffuncall (nargs=1, args=0xbfa567c0) at eval.c:3101
#15 0x081b2fd8 in Fbyte_code (bytestr=154611523, vector=154577852,
     maxdepth=<value optimized out>) at bytecode.c:678
#16 0x0817f683 in funcall_lambda (fun=139231628, nargs=1,
     arg_vector=0xbfa568f8) at eval.c:3231
#17 0x0817d543 in Ffuncall (nargs=2, args=0xbfa568f4) at eval.c:3101
#18 0x081b2fd8 in Fbyte_code (bytestr=154612139, vector=152878316,
     maxdepth=<value optimized out>) at bytecode.c:678
#19 0x0817f683 in funcall_lambda (fun=139932676, nargs=2,
     arg_vector=0xbfa569b0) at eval.c:3231
#20 0x0817f8a2 in apply_lambda (fun=139932676, args=154748525, eval_flag=1)
     at eval.c:3155
#21 0x0817ef37 in Feval (form=154748517) at eval.c:2435
#22 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#23 0x081800c6 in Flet (args=154748261) at eval.c:1089
#24 0x0817f303 in Feval (form=154748213) at eval.c:2322
#25 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#26 0x0817f7a7 in funcall_lambda (fun=154748584, nargs=2,
     arg_vector=0xbfa56bd0) at eval.c:3224
#27 0x0817f8a2 in apply_lambda (fun=154748589, args=154745637, eval_flag=1)
     at eval.c:3155
#28 0x0817ef37 in Feval (form=154745613) at eval.c:2435
---Type <return> to continue, or q <return> to quit---
#29 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#30 0x0817f303 in Feval (form=155615749) at eval.c:2322
#31 0x0817f303 in Feval (form=155615725) at eval.c:2322
#32 0x0817f0b8 in Feval (form=154745597) at eval.c:2433
#33 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#34 0x081800c6 in Flet (args=154745589) at eval.c:1089
#35 0x0817f303 in Feval (form=154745453) at eval.c:2322
#36 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#37 0x081800c6 in Flet (args=154746821) at eval.c:1089
#38 0x0817f303 in Feval (form=154746781) at eval.c:2322
#39 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#40 0x0817f303 in Feval (form=155617557) at eval.c:2322
#41 0x0817f303 in Feval (form=155617533) at eval.c:2322
#42 0x0817f0b8 in Feval (form=154746765) at eval.c:2433
#43 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#44 0x0817f7a7 in funcall_lambda (fun=154743928, nargs=0,
     arg_vector=0xbfa57200) at eval.c:3224
#45 0x0817f8a2 in apply_lambda (fun=154743933, args=137866521, eval_flag=1)
     at eval.c:3155
#46 0x0817ef37 in Feval (form=154743981) at eval.c:2435
#47 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#48 0x0817f7a7 in funcall_lambda (fun=154744008, nargs=0,
     arg_vector=0xbfa57320) at eval.c:3224
---Type <return> to continue, or q <return> to quit---
#49 0x0817f8a2 in apply_lambda (fun=154744013, args=137866521, eval_flag=1)
     at eval.c:3155
#50 0x0817ef37 in Feval (form=154150709) at eval.c:2435
#51 0x0817f4ef in Fprogn (args=155611013) at eval.c:449
#52 0x0817f7a7 in funcall_lambda (fun=154150040, nargs=0,
     arg_vector=0xbfa574ec) at eval.c:3224
#53 0x0817d543 in Ffuncall (nargs=1, args=0xbfa574e8) at eval.c:3101
#54 0x0817e8e1 in run_hook_with_args (nargs=1, args=0xbfa574e8,
     cond=to_completion) at eval.c:2703
#55 0x0817eaa2 in Frun_hooks (nargs=1, args=0xbfa57584) at eval.c:2566
#56 0x0817d6ee in Ffuncall (nargs=2, args=0xbfa57580) at eval.c:3025
#57 0x0817e769 in call1 (fn=138005017, arg1=138054393) at eval.c:2829
#58 0x0810d535 in Fkill_emacs (arg=137866521) at emacs.c:2151
#59 0x081124b5 in interrupt_signal (signalnum=2) at keyboard.c:10954
#60 <signal handler called>
#61 0xb8059430 in __kernel_vsyscall ()
#62 0xb75f8bcd in select () from /lib/tls/i686/cmov/libc.so.6
#63 0x081b926a in wait_reading_process_output (time_limit=0, microsecs=0,
     read_kbd=-1, do_display=1, wait_for_cell=137866521, wait_proc=0x0,
     just_wait_proc=0) at process.c:4452
#64 0x0811a991 in read_char (commandflag=1, nmaps=6, maps=0xbfa57f30,
     prev_event=137866521, used_mouse_menu=0xbfa58050, end_time=0x0)
     at keyboard.c:4058
---Type <return> to continue, or q <return> to quit---
#65 0x0811d1a2 in read_key_sequence (keybuf=0xbfa58104, bufsize=30,
     prompt=137866521, dont_downcase_last=0, can_return_switch_frame=1,
     fix_current_buffer=1) at keyboard.c:9365
#66 0x0811ee03 in command_loop_1 () at keyboard.c:1631
#67 0x0817cb40 in internal_condition_case (bfun=0x811ec20 <command_loop_1>,
     handlers=137910681, hfun=0x8117bc0 <cmd_error>) at eval.c:1511
#68 0x08117115 in command_loop_2 () at keyboard.c:1348
#69 0x0817cc1a in internal_catch (tag=137905657,
     func=0x81170f0 <command_loop_2>, arg=137866521) at eval.c:1247
#70 0x08117a0f in command_loop () at keyboard.c:1327
#71 0x08117dcb in recursive_edit_1 () at keyboard.c:942
#72 0x08117f14 in Frecursive_edit () at keyboard.c:1004
#73 0x0810e777 in main (argc=1, argv=0xbfa58784) at emacs.c:1852

Lisp Backtrace:
"scan-lists" (0xbfa56354)
"down-list" (0xbfa56498)
"byte-code" (0xbfa5652c)
"pp-buffer" (0xbfa567c4)
"pp-to-string" (0xbfa568f8)
"pp" (0xbfa569b0)
"let" (0xbfa56b50)
"prj-print-list" (0xbfa56bd0)
---Type <return> to continue, or q <return> to quit---
"progn" (0xbfa56d10)
"if" (0xbfa56d90)
"when" (0xbfa56e10)
"let" (0xbfa56f00)
"let" (0xbfa56ff0)
"progn" (0xbfa57080)
"if" (0xbfa57100)
"when" (0xbfa57180)
"prj-saveconfig" (0xbfa57200)
"prj-saveall" (0xbfa57320)
"prj-on-kill" (0xbfa574ec)
"run-hooks" (0xbfa57584)
(gdb)






  reply	other threads:[~2009-01-24 14:16 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 19:01 Functions in kill-emacs-hook aren't run if emacs gets killed with SIGTERM grischka
2009-01-23 22:52 ` Eli Zaretskii
2009-01-24 14:16   ` grischka [this message]
2009-01-24 16:14     ` Eli Zaretskii
2009-01-24 17:56       ` grischka
2009-01-24 18:20         ` Eli Zaretskii
2009-01-24 19:11           ` grischka
2009-01-24 20:08             ` Eli Zaretskii
2009-01-24 20:28               ` grischka
  -- strict thread matches above, loose matches on Subject: below --
2009-02-03 17:28 grischka
2009-02-05  3:37 ` Stefan Monnier
2009-02-05 13:31   ` grischka
2009-02-05 19:40     ` Stefan Monnier
2009-01-24 20:39 Stefan Monnier
2009-01-24 20:32 Stefan Monnier
2009-02-02 20:23 ` Eli Zaretskii
2009-02-02 20:52   ` Tassilo Horn
2009-02-02 21:09     ` Eli Zaretskii
2009-02-03 10:43       ` Tassilo Horn
2009-02-05  3:34   ` Stefan Monnier
2009-01-21  8:06 Tassilo Horn
2009-01-21 18:42 ` Eli Zaretskii
2009-01-21 19:49   ` Tassilo Horn
2009-01-21 20:35     ` Chong Yidong
2009-01-22  9:03       ` Tassilo Horn
2009-01-21 20:36   ` Stefan Monnier
2009-01-22  4:09     ` Eli Zaretskii
2009-01-22  9:00       ` Tassilo Horn
2009-01-22 18:23         ` Eli Zaretskii
2009-01-23  2:15           ` mail
2009-01-23 12:05             ` Eli Zaretskii
2009-01-22 10:08       ` Andreas Schwab
2009-01-22 18:25         ` Eli Zaretskii
2009-01-23  1:52         ` Richard M Stallman
2009-01-22 14:41       ` Stefan Monnier
2009-01-22 18:32         ` Eli Zaretskii
2009-01-22 21:16           ` Stefan Monnier
2009-01-23 15:25             ` Eli Zaretskii
2009-01-23 15:58               ` Tassilo Horn
2009-01-23 19:06                 ` Eli Zaretskii
2009-01-23 19:56                   ` David De La Harpe Golden
2009-01-23 22:39                     ` Eli Zaretskii
2009-01-23 23:00                       ` Tassilo Horn
2009-01-23 23:13                         ` Lennart Borgman
2009-01-24  9:04                           ` Tassilo Horn
2009-01-24  9:59                             ` Eli Zaretskii
2009-01-24 12:34                               ` Miles Bader
2009-01-24 10:00                             ` Eli Zaretskii
2009-01-23 20:33                   ` Dan Nicolaescu
2009-01-23 22:37                     ` Eli Zaretskii
2009-01-24  4:40               ` Jason Rumney
2009-01-24  6:11                 ` Miles Bader
2009-01-23  1:52         ` Richard M Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497B22CA.4080203@gmx.de \
    --to=grishka@gmx.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.