| Re: [chrony-dev] Re: [PATCH] Add -N option for s6-style service readiness notification |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: Emery Hemingway <emery@xxxxxxxxxxxxxxxx>
- Subject: Re: [chrony-dev] Re: [PATCH] Add -N option for s6-style service readiness notification
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 9 Apr 2026 15:58:20 +0200
- Cc: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775743106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JZSesMIh6M1MwR1QdYxpn2GtiVag2mJ9CvtsvPrq510=; b=GWNu8UmCWWQ7lHIenNzvzEn85xLEikJqbfWtiefDSSbj/LeaQR8Htcn9ggOyGT/xjbkQSX axIONdrIEUkfRD4N6gAUB0JeFyI9Ed8bFbPxgQGG+aY/RIJAnSzfdQ8zMGQXZpDYKmwFQE 6UaV+MB8vrIq2s/uQJcfVPwlI1y6O9Y=
On Thu, Apr 09, 2026 at 12:48:08PM +0000, Emery Hemingway wrote:
> In this notification scheme a service supervisor creates a pipe
> and passes the write file descriptor to chrony. When chronyd is
> initialised it writes a newline to the descriptor and the
> supervisor is informed that chronyd has successfully started and
> is in a ready state.
That looks better, thanks.
> +*-N* _fd_::
> +This option specifies a file descriptor that *chronyd* will write a newline
> +to after it is fully initialised. This is to notify a service supervisor that
> +*chronyd* is in a ready state.
After testing the code, I think this should also mention that it needs
to be combined with -n or -d.
> static void
> notify_system_manager(int start)
> {
It would be nice to have a "s6-style service readiness notification"
comment here.
> + if (start && notify_fd) {
> + write(notify_fd, "\n", 1);
> + close(notify_fd);
> + }
My compiler is complaining about unchecked return value from write().
Ideally there should be a fatal log message, e.g. "Could not send
notification to descriptor %d".
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.