[systemd-devel] [PATCH] core: notify triggered by socket of a service
Lennart Poettering
lennart at poettering.net
Tue Jul 16 18:01:55 PDT 2013
On Fri, 12.07.13 09:19, Umut Tezduyar (umut at tezduyar.com) wrote:
> >> + if ((se->state == SERVICE_DEAD ||
> >> + se->state == SERVICE_STOP ||
> >> + se->state == SERVICE_STOP_SIGTERM ||
> >> + se->state == SERVICE_STOP_SIGKILL ||
> >> + se->state == SERVICE_STOP_POST ||
> >> + se->state == SERVICE_FINAL_SIGTERM ||
> >> + se->state == SERVICE_FINAL_SIGKILL ||
> >> + se->state == SERVICE_AUTO_RESTART) &&
> >> + se->socket_fd < 0)
> >> + socket_notify_service_dead(s, false);
> >> +
> >> + if (se->state == SERVICE_RUNNING)
> >> + socket_set_state(s, SOCKET_RUNNING);
> > This doesn't work for socket activated/instantiated services. I should
> > be able to detect if a service is instantiated..
>
> Lennart, do you have a solution for this that I can take in and
> re-send the patch? It works great for socket activated services that
> when service is running, the triggered by socket is set to running too
> but it is not working for instantiated services. For instantiated
> services, socket needs to stay in "listening" stay all the time.
I am not really grokking the problem, but I figure the entire trigger
callback should be skipped (with an early return) if s->accept is
set. Are you looking for something else?
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list