From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2896 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Guillermo Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit SIGPWR support Date: Mon, 24 Feb 2020 18:13:19 -0300 Message-ID: References: <20200131043919.GF12551@cathexis.xen.prgmr.com> <20200214131544.tcvmh7tqu4hu2gul@caspervector> <1f198ed8-3682-26cd-e8d5-2efc412afde2@gmx.com> <18110531581952419@sas8-7ec005b03c91.qloud-c.yandex.net> <7003111582476686@vla3-6a5326aeb4ee.qloud-c.yandex.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="130926"; mail-complaints-to="usenet@ciao.gmane.io" To: supervision Original-X-From: supervision-return-2485-gcsg-supervision=m.gmane-mx.org@list.skarnet.org Mon Feb 24 22:13:39 2020 Return-path: Envelope-to: gcsg-supervision@m.gmane-mx.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by ciao.gmane.io with smtp (Exim 4.92) (envelope-from ) id 1j6L2p-000XwO-HI for gcsg-supervision@m.gmane-mx.org; Mon, 24 Feb 2020 22:13:39 +0100 Original-Received: (qmail 31559 invoked by uid 89); 24 Feb 2020 21:13:59 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 31552 invoked from network); 24 Feb 2020 21:13:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=Tod+zV6m/Fp2hoR+rNc67FNa2f3iQlsPlZfYlZmMQGU=; b=uYRUamuKY1RfAAixZRVG3pUbQzebjD5YTzp4VMqylYjxkug0zed9xUWD3/JdOGvw5R urfabaL/FACYhTIL+xwh8DvOmfnm47AdlWZqbR4JFMV19StsFUsFt3+d89mX+8tViqX7 prUr3DGxha3mM+IyOOjXfkwP4bVHCpZBe6GdzilNZIE6jXvHaZlyqnd6uGRo02OUVME+ 6PHegWnsuvDRHISd7MFv9pk8SvmnqWF4JNoCJ2T3xJXl87h/qnJleZFvxeQ/xJSTrJZo SFQhZm9eqF64eiW5JqDSYkg5QzWJhWuS0HTeoM4HGJXMb07dkPHTSCU5kcAZ8y8NTaoC oQvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=Tod+zV6m/Fp2hoR+rNc67FNa2f3iQlsPlZfYlZmMQGU=; b=UnHIjvQmbs8vSMOXpiO/QrOSb8LFKKI9IBbWiynoXkqipJFN4qdyV7dtcfF9y0rRtp 5wGGQAm0tbFiMBBGNdh0u984mqOXLRAD36zsEbvkIxJZFUl9GEztQ9iwkHdfXROhoqkP e5KlJV7KYFRert26yTF2PXXQOqmUwh0sxbDj1wscKDc+ZESaEhjhrNzYDGHJqT6XLafb 33cdphMlcAEhUKFJwmi5BBb+/oSeYQg34pPdjyuzLZlix/a1QkyOtcLyx+5r3xdUzgzl Ae8fKvLSZOlyzsLJUkYzBRk5jfhbgXBQQYWiFAWJHPd31v51urt8rOIeqZHl0KbmagNo Sfvw== X-Gm-Message-State: APjAAAWIogpkT7FO/xW4Gv+lM1OCJ1R2ct45gkd2Ymf0U3RUS0wYUAND 3C8MIl3Fuj7qOi5awlExp3x2QYCih2KDd/2yc92Z5w== X-Google-Smtp-Source: APXvYqyPmPrjpBncJf3RUVTGpzbFcGNYnqohaDNFh0N1Q5y6frPTgduQ9+89edCFLqAF3x9yGnuhcGdN+3P20vbOMUs= X-Received: by 2002:a92:24d7:: with SMTP id k206mr53470286ilk.12.1582578808691; Mon, 24 Feb 2020 13:13:28 -0800 (PST) In-Reply-To: Xref: news.gmane.io gmane.comp.sysutils.supervision.general:2896 Archived-At: The keyboard signal can actually be set to any signal less than or equal to NSIG with the KDSIGACCEPT ioctl. sysvinit just happened to pick SIGWINCH for that, and so did systemd and nosh, presumably for compatibility. El dom., 23 feb. 2020 a las 20:53, Laurent Bercot escribi=C3=B3: > > Both SIGPWR and SIGWINCH are caught in the latest s6 git head. > > Release coming whenever real life stop throwing things at me and I > can actually find a week-end to polish things and cut it. I noticed that you modified s6-svscan to divert SIGPWR and SIGWINCH, but s6-linux-init-maker only creates a handler for SIGPWR (that just does 's6-inux-init-shutdown -a -p -- now', like the SIGUSR1 handler). If you bothered making SIGWINCH 'divertable', you could also add the KDSIGACCEPT ioctl() call to the stage1 init (s6-linux-init), just like you did with the reboot(RB_DISABLE_CAD) call, and have s6-linux-init-maker create a run-image/service/.s6-svscan/SIGWINCH file. My suggested action for SIGWINCH would be to execute a file in the 'scripts' subdirectory of the basedir. The skeldir counterpart of this file could be a shell script with only explanatory comments, just like the skeldir's rc.shutdown.final (so, by default, unless the administrator configures something, the keyboard signal would do nothing). Since the inittab action field for the keyboard signal is "kbrequest", the target unit that systemd starts in response to the keyboard signal is named "kbrequest.target", and the target bundle that nosh's system-manager starts in response to the keyboard signal is named "kbrequest", my extremely original suggestion for the script's name would be... "kbrequest" :) (Actually, for sysvinit, systemd and nosh, the action in response to SIGPWR is also configurable, and by default SIGPWR does nothing, so I don't know what LXC containers do if they include an init system=E2=80=A6 t= hey must have some extra configuration I guess). G.