From debbugs-submit-bounces@debbugs.gnu.org Fri May 18 16:27:48 2018 Received: (at submit) by debbugs.gnu.org; 18 May 2018 20:27:48 +0000 Received: from localhost ([127.0.0.1]:40227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fJlye-0005gN-1G for submit@debbugs.gnu.org; Fri, 18 May 2018 16:27:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fJlya-0005g8-A5 for submit@debbugs.gnu.org; Fri, 18 May 2018 16:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJlyU-0006fR-8W for submit@debbugs.gnu.org; Fri, 18 May 2018 16:27:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fJlyU-0006fG-4m for submit@debbugs.gnu.org; Fri, 18 May 2018 16:27:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJlyT-0004CW-5P for bug-gnu-emacs@gnu.org; Fri, 18 May 2018 16:27:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJlyQ-0006dG-1T for bug-gnu-emacs@gnu.org; Fri, 18 May 2018 16:27:37 -0400 Received: from lucaswerkmeister.de ([94.130.58.99]:48524) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fJlyP-0006cX-NA for bug-gnu-emacs@gnu.org; Fri, 18 May 2018 16:27:33 -0400 Received: from theoden.lucaswerkmeister.de.home (unknown [IPv6:2a02:8109:92c0:22bb:d412:2b0:339e:ab21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mail@lucaswerkmeister.de) by lucaswerkmeister.de (Postfix) with ESMTPSA id E693636DEDB; Fri, 18 May 2018 22:27:31 +0200 (CEST) Authentication-Results: lucaswerkmeister.de; dmarc=fail (p=none dis=none) header.from=lucaswerkmeister.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucaswerkmeister.de; s=mail; t=1526675252; bh=2vXG3QMMwxt6Jk7/TgTzTPXDegQTy7cx+WHEbGvVT3o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:From:Reply-To:Subject:Date:To:Cc: In-Reply-To:References:Message-Id:Sender:Content-Type: Content-Transfer-Encoding:Content-Disposition:Mime-Version; b=UiNTVRhkarODPqgErp2N+sQmxM1o+WoS2hloX+Y4afvAE7Odg6iWHkhekpJl48ZkY WTxvqKzLDdOOQNx+B+tER7XMSTrNDIlUxCLaqltzzOYixvshTXOAGwsfQMhi4+ozek Hprq72t3CVpqScXjqourRFC30TLB9SsC+DFhevrE= From: Lucas Werkmeister To: bug-gnu-emacs@gnu.org Subject: [PATCH] * src/emacs.c (kill-emacs): notify systemd Date: Fri, 18 May 2018 22:27:27 +0200 Message-Id: <20180518202727.17248-1-mail@lucaswerkmeister.de> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit Cc: Lucas Werkmeister X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) --- Notes: This doesn=E2=80=99t do very much beyond changing what you see in `sy= stemctl status`, but I figure it doesn=E2=80=99t hurt either. (But feel free = to reject the patch if you disagree, I won=E2=80=99t mind.) src/emacs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index f25e612664..d204dadb79 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2017,6 +2017,10 @@ all of which are called before Emacs is actually k= illed. */ { int exit_code; =20 +#ifdef HAVE_LIBSYSTEMD + sd_notify(0, "STOPPING=3D1"); +#endif /* HAVE_LIBSYSTEMD */ + /* Fsignal calls emacs_abort () if it sees that waiting_for_input is set. */ waiting_for_input =3D 0; --=20 2.17.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 07 09:09:02 2018 Received: (at control) by debbugs.gnu.org; 7 Jun 2018 13:09:03 +0000 Received: from localhost ([127.0.0.1]:37549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQuf0-00028p-OB for submit@debbugs.gnu.org; Thu, 07 Jun 2018 09:09:02 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fQuez-00028I-44; Thu, 07 Jun 2018 09:09:01 -0400 Received: by mail-it0-f68.google.com with SMTP id a195-v6so12730856itd.3; Thu, 07 Jun 2018 06:09:01 -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=XcUqqe0gRfqcWdqcf0J9sIIEMhELgy23N/ghRuwy8fE=; b=cxBTd+C6kQm3OhrzoiA7tEc3eyYCRe9FjqiBDLbHHkzS6PqYBWZ4Lo21ERHxJQ0h89 h0P8FZLG5bE+/ohA8RCmAklbBt3di3TeW67aSXo7X3lLX16qdR0UalFnN01hCUBfhtR3 hMlPs2H4LODNrcH9m8du668PWb8wh4+8j9qoiloyOLC2xPtEQKx20hsIt+HO8TuZaJVz HL69teePG7N3KiSuJ4XD19soIjgyMBVeiOecWKBUFdxNDIsXGoMHQvRSSnBW/haJT8D3 8tkSWLgAe2t2bdzDUdFX3Nd21EdnDh8r18jgo6sbYWaXkXC6tx8wdGRPFws9lr9KeTym GWUA== 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=XcUqqe0gRfqcWdqcf0J9sIIEMhELgy23N/ghRuwy8fE=; b=ZRwvMKNVReYXJX3L7hP4qPJKhz6c9V0p74dlbcFY/iKBq4LpNC12TjqvRlHWDgayh5 +Y3NZcPUsT4NlMhC93cOgwppTMfxDVCuWBXBlZyF9EclKqSzd3d0M0jlQqbC2iruQUfw GtYSW2bIM9AfyyoH7SA8PbrXaw6B9oc1kemm8vY7sRaLR8HkCWf68vCEZmp5rB3LnlKz 54rkflztuvTMjbTTnGAgxzFiFSXKSSdVR9gOr8giwb4downKxpYcGMp+HnEoPZ3X/4Ap VWTvKwBz6+2pMSTfzwkqv3b2TQBHpzHqQ9H6k8ZV4IsGC/09YcYhxo1Sj/ovZ8yuroGf LOPg== X-Gm-Message-State: APt69E396W4n4HKl/T+Ku5QsaKZvtC3WXqJbXM71r91Ohp2g1sa+VVD1 sCBFwboYOhtClwtNjAvxVyKMAA== X-Google-Smtp-Source: ADUXVKIjBeZgsvKsvIqWexe7haBRMVeCxbcxirUV6K+wZaqblqpuASRax8SOeXgffh+2DOxS/3AtoQ== X-Received: by 2002:a24:d651:: with SMTP id o78-v6mr1727963itg.94.1528376935530; Thu, 07 Jun 2018 06:08:55 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id z6-v6sm4818648iob.15.2018.06.07.06.08.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 06:08:54 -0700 (PDT) From: Noam Postavsky To: Lucas Werkmeister Subject: Re: bug#31498: [PATCH] Notify systemd in daemon-initialized References: <20180518174031.12514-1-mail@lucaswerkmeister.de> Date: Thu, 07 Jun 2018 09:08:51 -0400 In-Reply-To: <20180518174031.12514-1-mail@lucaswerkmeister.de> (Lucas Werkmeister's message of "Fri, 18 May 2018 19:40:31 +0200") Message-ID: <87bmcm3frw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: 31498@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 31498 wishlist severity 31521 wishlist quit Thanks, the patch seems straightforward enough. Just a few minor comments about formatting. Have you assigned copyright for Emacs? The patch is small enough to go in anyway, it would just have to be marked. 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 ^ double space > 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. > * etc/emacs.service: update Type The ChangeLog entries should be captilalized and end with a period: "Update Type." > * src/emacs.c (daemon-initialized): call sd_notify() Same here. 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 25 21:14:00 2018 Received: (at control) by debbugs.gnu.org; 26 Jul 2018 01:14:00 +0000 Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiUqu-00083y-3m for submit@debbugs.gnu.org; Wed, 25 Jul 2018 21:14:00 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:34710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiUqs-00083h-6q; Wed, 25 Jul 2018 21:13:58 -0400 Received: by mail-io0-f178.google.com with SMTP id l7-v6so42442ioj.1; Wed, 25 Jul 2018 18:13:58 -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:content-transfer-encoding; bh=LkUPULifwHdXX2i2Elb81/E4x7+I14U96o1U+VgZQXE=; b=LiU8l2TJ3y546I/nqzFrNCL9iUBI0as/qm4j0t2x75QhclabgRnt3hMq/PwRagqMZj QrMwsjxR0qBwjOQTbigF14ngX2JwDnOrz1HhJVtphPjEhqSRswlhZ8bDLeJASxhu/qP3 06jWnARqgzF2rMT/0T43X/l6iYOJfwoAXNyyKcctuCtOjINrTLKUmkO3ppssBfXyqIS8 OEN1/RlwanNVu28uS5nbR/gEXvhSyqnTcwcu+EekfoGcpA0/KSnWVTozJTXdRfwp5Ihl OThEr0XPiX75/SSGT2F2FJuMSzd12A3kHbnhVJ06WNykCmUVNJS9EanA+5DcE4Kz5qPd nMnQ== 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:content-transfer-encoding; bh=LkUPULifwHdXX2i2Elb81/E4x7+I14U96o1U+VgZQXE=; b=PcDH4UH07TyIWuYZYwgx73NnxIMvko3pDzPJRsguBwpspSDykjgjjSgo3O8mDZEF0p VPzQmnz6SIng50cvWR8izBepjZQin7O9e5ITb9M/N7zOyBmkWVDovKH+Hs2dc+W42SMY 75hra74XpZnZc80VgAYGFVk2TzSDkB4+z81p0qP4TG6Nnjw0N1xjFohJ98WM3QXtvz4h DmQ/gxT6NA8SPhxEWj3BvtH4f9ULYUKE/Pvdfat7iJiG6A5py1IjzUZWqPmbKnd99GSW 89l84/PA1G9H2fMXHwuNDbwxs7jDvfoULK0Zgb++hsjgq6ChfpGYPkoPzizKjsgOp+tf x2Ow== X-Gm-Message-State: AOUpUlHVoXZWW8aH1UJYqwJfgv+k5IuJ7XF+hBkMdMVYgkww58EMybQT 79g2IwsQSLBDSEOYhfrZ1r9YNzTd X-Google-Smtp-Source: AAOMgpccjVCd4TPCaWDCYTwlojKHTQNmMLAaesUVmz1xSuRvlJb2RX0elFg5SGe7CI61ozK9h7WKLQ== X-Received: by 2002:a6b:e403:: with SMTP id u3-v6mr9359212iog.131.1532567632510; Wed, 25 Jul 2018 18:13:52 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e2-v6sm4587095ioa.33.2018.07.25.18.13.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 18:13:51 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#31498: [PATCH] Notify systemd in daemon-initialized and, , kill-emacs References: <20180518174031.12514-1-mail@lucaswerkmeister.de> <9357f81a-2bf4-acfd-3743-1616b6062dd0@lucaswerkmeister.de> <83wotjtlqb.fsf@gnu.org> Date: Wed, 25 Jul 2018 21:13:50 -0400 In-Reply-To: <83wotjtlqb.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Jul 2018 17:48:28 +0300") Message-ID: <871sbq4x4h.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 31498@debbugs.gnu.org, Lucas Werkmeister X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 31498 31521 tags 31498 fixed close 31498 27.1 quit Eli Zaretskii writes: >> From: Lucas Werkmeister >> Date: Wed, 25 Jul 2018 14:03:08 +0200 >>=20 >> I=E2=80=99ve been notified that my name should be on the file now. > > Indeed, it is. I've pushed to master. [1: 19f5f7b19b]: 2018-07-25 21:07:03 -0400 Notify systemd in daemon-initialized and kill-emacs (Bug#31498) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D19f5f7b19b0dcdae= 87476a3fd51c41f840b2b80f From unknown Sat Sep 20 00:09:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Aug 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator