Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Michael Chapman
On Tue, 8 Nov 2016, Raghavendra. H. R wrote: Does it mean that only services can notify systemd about their readiness and systemd will not notify another service. The "notify" in Type=notify has nothing to do with notifications *between* units. The Type= directive's only purpose is to tell

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Raghavendra. H. R
Does it mean that only services can notify systemd about their readiness and systemd will not notify another service. sd_notify call from *Myapp *of one.service is returning value '1'. So one.service has successfully notified systemd that it is READY. *But I observe second.service is not

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Alessandro Puccetti
I do not understand the relation between your question and service dependencies (e.g. Requires= and After= directives). Second is started when all the required services are ready, because of "Requires=one.service" second will be started after one's status is READY. Because one is Type=notify this

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Raghavendra. H. R
Just one last question. Does systemd notifies other services based on this notification ? I have 2 service files, application in one service file sends notification using sd_notify does systemd starts another service file. one.service *[Unit]* *Description=Sd_notify example*

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Michael Biebl
I suggest reading https://www.freedesktop.org/software/systemd/man/daemon.html It's not necessary to fork for a new-style daemon and actually discouraged. 2016-11-08 14:28 GMT+01:00 Raghavendra. H. R : > Hi Tomasz, > > Thanks for pointing out the mistake. I actually missed

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Alessandro Puccetti
On Tue, Nov 8, 2016 at 2:28 PM, Raghavendra. H. R wrote: > Hi Tomasz, > > Thanks for pointing out the mistake. I actually missed the line > "Type=notify" in the mail. > I found the journalctl logs and from that I can make out the real problem > is not about NOTIFY_SOCKET. It

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Raghavendra. H. R
Hi Tomasz, Thanks for pointing out the mistake. I actually missed the line "Type=notify" in the mail. I found the journalctl logs and from that I can make out the real problem is not about NOTIFY_SOCKET. It is about child process in my application *Myapp.* Below given is my Service file.

Re: [systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Tomasz Torcz
On Tue, Nov 08, 2016 at 05:01:59PM +0530, Raghavendra. H. R wrote: > Hi All, > > I'm a newbie in Systemd init system and I'm exploring sd_notify which is > basically used for notification purpose in SystemD. It is written “systemd” (all lowercase). > I have created one unit file which is of

[systemd-devel] Query regarding NOTIFY_SOCKET

2016-11-08 Thread Raghavendra. H. R
Hi All, I'm a newbie in Systemd init system and I'm exploring sd_notify which is basically used for notification purpose in SystemD. I have created one unit file which is of type "notify" and in my application I have written sd_notify(0, "READY=1"); from which SystemD can be notified that my