unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* process sentinel and kill-emacs
@ 2007-05-22  0:35 JD Smith
  2007-05-22 14:52 ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: JD Smith @ 2007-05-22  0:35 UTC (permalink / raw)
  To: emacs-devel


Should a process's sentinel not run when kill-emacs is invoked with
running processes?  It appears the sentinel is not run (despite the
prompting in save-buffer-kill-emacs: "Active processes exist; kill them
and exit anyway?").  Any suggested workaround?

JD

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process sentinel and kill-emacs
  2007-05-22  0:35 process sentinel and kill-emacs JD Smith
@ 2007-05-22 14:52 ` Richard Stallman
  2007-05-22 19:02   ` JD Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-05-22 14:52 UTC (permalink / raw)
  To: JD Smith; +Cc: emacs-devel

    Should a process's sentinel not run when kill-emacs is invoked with
    running processes?  It appears the sentinel is not run (despite the
    prompting in save-buffer-kill-emacs: "Active processes exist; kill them
    and exit anyway?").  Any suggested workaround?

Why is it vital to run sentinels when you are killing Emacs anyway?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process sentinel and kill-emacs
  2007-05-22 14:52 ` Richard Stallman
@ 2007-05-22 19:02   ` JD Smith
  2007-05-22 19:25     ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: JD Smith @ 2007-05-22 19:02 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

On Tue, 2007-05-22 at 10:52 -0400, Richard Stallman wrote:
>     Should a process's sentinel not run when kill-emacs is invoked with
>     running processes?  It appears the sentinel is not run (despite the
>     prompting in save-buffer-kill-emacs: "Active processes exist; kill them
>     and exit anyway?").  Any suggested workaround?
> 
> Why is it vital to run sentinels when you are killing Emacs anyway?

In my case, because the sentinel is writing out a comint input history
log, which you'd like to preserve even if the shell isn't cleanly
exited.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process sentinel and kill-emacs
  2007-05-22 19:02   ` JD Smith
@ 2007-05-22 19:25     ` Chong Yidong
  2007-05-22 20:53       ` JD Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2007-05-22 19:25 UTC (permalink / raw)
  To: JD Smith; +Cc: rms, emacs-devel

JD Smith <jdsmith@as.arizona.edu> writes:

> On Tue, 2007-05-22 at 10:52 -0400, Richard Stallman wrote:
>>     Should a process's sentinel not run when kill-emacs is invoked with
>>     running processes?  It appears the sentinel is not run (despite the
>>     prompting in save-buffer-kill-emacs: "Active processes exist; kill them
>>     and exit anyway?").  Any suggested workaround?
>> 
>> Why is it vital to run sentinels when you are killing Emacs anyway?
>
> In my case, because the sentinel is writing out a comint input history
> log, which you'd like to preserve even if the shell isn't cleanly
> exited.

Try putting something on kill-emacs-hook.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process sentinel and kill-emacs
  2007-05-22 19:25     ` Chong Yidong
@ 2007-05-22 20:53       ` JD Smith
  0 siblings, 0 replies; 5+ messages in thread
From: JD Smith @ 2007-05-22 20:53 UTC (permalink / raw)
  To: Chong Yidong; +Cc: rms, emacs-devel

On Tue, 2007-05-22 at 15:25 -0400, Chong Yidong wrote:
> JD Smith <jdsmith@as.arizona.edu> writes:
> 
> > On Tue, 2007-05-22 at 10:52 -0400, Richard Stallman wrote:
> >>     Should a process's sentinel not run when kill-emacs is invoked with
> >>     running processes?  It appears the sentinel is not run (despite the
> >>     prompting in save-buffer-kill-emacs: "Active processes exist; kill them
> >>     and exit anyway?").  Any suggested workaround?
> >> 
> >> Why is it vital to run sentinels when you are killing Emacs anyway?
> >
> > In my case, because the sentinel is writing out a comint input history
> > log, which you'd like to preserve even if the shell isn't cleanly
> > exited.
> 
> Try putting something on kill-emacs-hook.

Thanks, that works (though it seems a bit inelegant, compared to calling
the process sentinel when kill-emacs kills the process).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-22 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-22  0:35 process sentinel and kill-emacs JD Smith
2007-05-22 14:52 ` Richard Stallman
2007-05-22 19:02   ` JD Smith
2007-05-22 19:25     ` Chong Yidong
2007-05-22 20:53       ` JD Smith

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).