From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2540 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6 style "readiness notification" with perpd Date: Fri, 26 Apr 2019 15:28:30 +0000 Message-ID: References: <1122921556241940@sas1-d856b3d759c7.qloud-c.yandex.net> <3049721556290911@iva7-6548a8037c6d.qloud-c.yandex.net> Reply-To: "Laurent Bercot" Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="211272"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: eM_Client/7.2.34711.0 To: supervision Original-X-From: supervision-return-2130-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Apr 26 17:27:44 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hK2lM-000ss0-4o for gcsg-supervision@m.gmane.org; Fri, 26 Apr 2019 17:27:44 +0200 Original-Received: (qmail 12226 invoked by uid 89); 26 Apr 2019 15:28:09 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 12219 invoked from network); 26 Apr 2019 15:28:08 -0000 In-Reply-To: <3049721556290911@iva7-6548a8037c6d.qloud-c.yandex.net> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2540 Archived-At: >how is that ? >what if 2 services (non-interdependent, to be started concurrently) >specify/use the same fd (number) to write their readiness notification >message to ? how could perpd tell which of the 2 nofied it ? It doesn't matter what the number is that the service sees. As long as perpd creates a separate pipe for every service (which is why it would count against the maximum number of services it can maintain), it can read the notifications from every service separately. The notification-fd value used by s6-supervise is not relevant to s6-supervise, it's only relevant to the service. It's only used by s6-supervise at ./run spawning time, to tell what number the *child* should dup2() the notification pipe to before execing ./run, so the pipe is made available to the service on the fd it expects. The supervisor itself does not use fixed fd numbers. It would be the same with perpd. -- Laurent