Re: [systemd-devel] sd_watchdog_enabled: how to use when forking process?

2018-01-22 Thread Lennart Poettering
On Fr, 19.01.18 17:41, Simon McVittie (s...@collabora.com) wrote: > On Fri, 19 Jan 2018 at 17:22:51 +, philip is hungry wrote: > > however if i run the forkme function (to put process in the background) it > > behaves as follows: > > > > Jan 18 15:06:25 thinkpad waitonly[11228]: Return from f

Re: [systemd-devel] sd_watchdog_enabled: how to use when forking process?

2018-01-22 Thread Jérémy Rosen
Alternatively, NotifyAccess= in [Service allows other processes to ping the watchdog, but Simon is right... forking is not needed for systemd. On 19/01/2018 18:41, Simon McVittie wrote: On Fri, 19 Jan 2018 at 17:22:51 +, philip is hungry wrote: however if i run the forkme function (to put

Re: [systemd-devel] sd_watchdog_enabled: how to use when forking process?

2018-01-19 Thread Simon McVittie
On Fri, 19 Jan 2018 at 17:22:51 +, philip is hungry wrote: > however if i run the forkme function (to put process in the background) it > behaves as follows: > > Jan 18 15:06:25 thinkpad waitonly[11228]: Return from forkme = 11228 > Jan 18 15:06:25 thinkpad waitonly[11228]: Return from lockme

[systemd-devel] sd_watchdog_enabled: how to use when forking process?

2018-01-19 Thread philip is hungry
I am trying to use "sd_watchdog_enabled".  If I run my service without forking, the sd_watchdog_enabled function works as expected: Jan 18 15:05:29 thinkpad systemd[1]: Starting WaitonlyServer... Jan 18 15:05:30 thinkpad waitonly[11172]: PID before fork  = 11172 Jan 18 15:05:30 thinkpad waitonly[