From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31498: [PATCH] Notify systemd in daemon-initialized and kill-emacs Date: Sat, 09 Jun 2018 08:29:22 -0400 Message-ID: <87k1r816u5.fsf@gmail.com> References: <20180518174031.12514-1-mail@lucaswerkmeister.de> <20180609105616.12927-1-mail@lucaswerkmeister.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528547290 27732 195.159.176.226 (9 Jun 2018 12:28:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2018 12:28:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31498@debbugs.gnu.org To: Lucas Werkmeister Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 09 14:28:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRcyT-00077M-BH for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jun 2018 14:28:05 +0200 Original-Received: from localhost ([::1]:40234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRd0a-0006kd-90 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jun 2018 08:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRd0R-0006kT-8s for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 08:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRd0M-0007pj-B4 for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 08:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRd0M-0007pf-7H for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 08:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRd0M-0003Gf-0X for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jun 2018 12:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31498-submit@debbugs.gnu.org id=B31498.152854737212497 (code B ref 31498); Sat, 09 Jun 2018 12:30:01 +0000 Original-Received: (at 31498) by debbugs.gnu.org; 9 Jun 2018 12:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:40416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRczs-0003FV-85 for submit@debbugs.gnu.org; Sat, 09 Jun 2018 08:29:32 -0400 Original-Received: from mail-io0-f182.google.com ([209.85.223.182]:46081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRczq-0003FJ-Gg for 31498@debbugs.gnu.org; Sat, 09 Jun 2018 08:29:30 -0400 Original-Received: by mail-io0-f182.google.com with SMTP id d22-v6so18857384iof.13 for <31498@debbugs.gnu.org>; Sat, 09 Jun 2018 05:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nKX9Yq4UKsFJ3leiyg1mqFf48NZU7Oj91Au5NFcjCoY=; b=n2BDZVTAbRmyId8z40d1HqNh0Hy6y0NnEhV9IV4GvZLfLQeE8CaIhkWsdFRyzYxdMN t/vyBObIF42z8qWDEJYwI/6Lis8FFR2F+5o26Uj/iIGiZqXBkmLdXIqsBkyJsuF4xOLk SyW0ZEgxgXRM3CUMTG43RLy/mQphiQWrGPmOpGB2fvTNasb9kp4EVBoOYvl0aTeDPKhq 5PKXvkNhKLZg4nRLYoUF24+qtraX4KEflEHifOyGLVVWtbHDrTRuO65vh+L/dEF1+3T7 93pYFjR96401qI2QMIQb4kl0IDFiXj8NYDGRDoPeZ/6Z1rcIU8MXW9+UdnbLwrZAW6zV DHtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=nKX9Yq4UKsFJ3leiyg1mqFf48NZU7Oj91Au5NFcjCoY=; b=NWrtjZUNQoo1UYtPF/Tv876cv1mHsshZEQeL6iuajGOHCSco4/VbdcOD1hLkpT+lnX gGi2xjtL7vXXqJlPgAn7oXZ2zR32b1XhBz4NYoP0nHvbnspDT7nS2Y1RRxKr/kxPTefR tDafz1SUWFrRzk8dK5UwNn6SG1neNTa2slxYgiuI7fm9wigIqcpyuPVwql/+VHPf57zC k49KImnh6iH2EhwNHL+2KqTw81ZNcXOcflfpa5efUct2Od1itDLUqYIj8+5p/waDzt45 9lDFPsd9JjJQCIXW0e0AckJx5/nRbcELKFgGIrW0ms5+ffOiNQKlE7HoKVGKIOLZ/9WD XP+g== X-Gm-Message-State: APt69E2dQ4PuOIEKvKzoLH71qHAuqyvKxDY2U4UPJ5OQOL9fZFf/OjZZ 3fG+uuysj6BBtEcNNkLY4QKaoQ== X-Google-Smtp-Source: ADUXVKKOQlW1bFL6ck8kLoD40A0fFk57bmDz7AJyxFRGoXl4tZbvf+I0SRnRQavkPxVSMB9Gd271Gw== X-Received: by 2002:a6b:978c:: with SMTP id z134-v6mr8056019iod.184.1528547364965; Sat, 09 Jun 2018 05:29:24 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id k1-v6sm9611633iob.9.2018.06.09.05.29.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 05:29:24 -0700 (PDT) In-Reply-To: <20180609105616.12927-1-mail@lucaswerkmeister.de> (Lucas Werkmeister's message of "Sat, 9 Jun 2018 12:56:16 +0200") 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: 208.118.235.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:147238 Archived-At: > >> I think it should have a NEWS entry mentioning that Emacs now supports > >> this systemd notification feature. I would probably go ahead and > >> combine with #31521, since it's using the same feature. > >> > > > > Do you mean, announce both in this patch, or completely merge that patch > > into this one? > The latter (maybe it would have been clearer to put those two sentences > in separate paragraphs). I think I still managed to be unclear about this; I meant you should both announce the change in etc/NEWS, and merge the patches. Lucas Werkmeister writes: > With --[bg-]daemon and Type=forking, systemd will only consider the > daemon to have fully started up once the original process exits, and > will wait until then to start units depending on the Emacs service. To > get the same functionality with --fg-daemon, use Type=notify instead of > Type=simple and explicitly send a readiness notification to systemd at > the point where the forked process would in --bg-daemon mode notify its > parent process and cause it to exit. Similarly, notify systemd at the > beginning of the shutdown process as well. (Both of these calls are > successful no-ops if emacs was not started by systemd.) > * etc/emacs.service: Update Type. > * src/emacs.c (daemon-initialized): Call sd_notify(). > * src/emacs.c (kill-emacs): Call sd_notify(). Thanks, I think I still managed to be unclear about the