unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 7837@debbugs.gnu.org
Subject: bug#7837: 23.2.91; Logging out is confusing if Emacs has background processes running
Date: Thu, 03 Oct 2019 17:33:09 +0200	[thread overview]
Message-ID: <87zhihsv2i.fsf@gnus.org> (raw)
In-Reply-To: <CAOnWdohh3j9aHnx=0E-PArfFdeEU-uVV0S1SHfDhSqsT-RwqBA@mail.gmail.com> (Reuben Thomas's message of "Tue, 1 Oct 2019 21:59:04 +0100")

Reuben Thomas <rrt@sc3d.org> writes:

> https://www.x.org/releases/X11R7.7/doc/libSM/xsmp.html
>
> Emacs already implements this: see src/xsmfns.c. The problem is its behaviour
> when there are background processes.

I guess it's this code?

DEFUN ("handle-save-session", Fhandle_save_session,
       Shandle_save_session, 1, 1, "e",
       doc: /* Handle the save_yourself event from a session manager.
A session manager can tell Emacs that the window system is shutting down
by sending Emacs a save_yourself message.  Emacs executes this function when
such an event occurs.  This function then executes `emacs-session-save'.

[...]

  else if (kill_emacs)
    {
      /* We should not do user interaction here, but it is not easy to
         prevent.  Fix this in next version.  */
      Fkill_emacs (Qnil);

I started a background process that `C-x C-c' will query me about before
exiting, but calling `kill-emacs' directly will kill Emacs without
querying about those processes.

Is there a different path being taken when Emacs gets this event from
the system?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-10-03 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 19:24 bug#7837: 23.2.91; Logging out is confusing if Emacs has background processes running Reuben Thomas
2019-10-01 20:55 ` Lars Ingebrigtsen
2019-10-01 20:59   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-03 15:33     ` Lars Ingebrigtsen [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zhihsv2i.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=7837@debbugs.gnu.org \
    --cc=rrt@sc3d.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 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).