From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <87zhihsv2i.fsf@gnus.org> References: <87k4i8mwt7.fsf@sc3d.org> <87a7akw5i2.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="41194"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 7837@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 03 17:35:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iG38U-000AZV-2o for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Oct 2019 17:35:22 +0200 Original-Received: from localhost ([::1]:37682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG38S-0006Rc-Cp for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Oct 2019 11:35:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46735) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG37N-0006MT-FY for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2019 11:34:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iG37D-0007hd-C0 for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2019 11:34:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iG37C-0007hR-O2 for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2019 11:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iG37C-0005Hg-Fq for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2019 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2019 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7837 X-GNU-PR-Package: emacs Original-Received: via spool by 7837-submit@debbugs.gnu.org id=B7837.157011679620252 (code B ref 7837); Thu, 03 Oct 2019 15:34:02 +0000 Original-Received: (at 7837) by debbugs.gnu.org; 3 Oct 2019 15:33:16 +0000 Original-Received: from localhost ([127.0.0.1]:40823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iG36S-0005GY-11 for submit@debbugs.gnu.org; Thu, 03 Oct 2019 11:33:16 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:50230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iG36P-0005GO-FF for 7837@debbugs.gnu.org; Thu, 03 Oct 2019 11:33:14 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iG36L-0000er-A1; Thu, 03 Oct 2019 17:33:11 +0200 In-Reply-To: (Reuben Thomas's message of "Tue, 1 Oct 2019 21:59:04 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168229 Archived-At: Reuben Thomas 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