[systemd-devel] forking PIDFile question

steve at goodey.org steve at goodey.org
Wed Feb 21 15:24:40 UTC 2018


On Tuesday, 20 February 2018 08:32:45 GMT Mantas Mikulėnas wrote:
> On Mon, Feb 19, 2018 at 11:29 PM, <steve at goodey.org> wrote:
> > Hello,
> > 
> > 
> > 
> > Sorry if this question is a bit basic for a devel list, I tried asking it
> > in a ubuntu forum but didn't get any views, let alone replies.
> > 
> > 
> > 
> > I have a PC running Mythbuntu which has an LCD which I had a bit of a
> > struggle getting going under systemd. However using Type=forking it is now
> > working fine. However reading the man page for systemd.service is says
> > that
> > it is recommended to use PIDFile.
> 
> It might be recommended in some cases (the more complex the daemon is), but
> useless in your case.
> 
> Removing the line PIDFile=/run/LCDd.pid in LCDd.service and all is good.
> 
> > I have tried creating LCDd.pid in /run with root:root but get the same.
> > How is the pid file generated?
> 
> It is created by your daemon process.
> 
> If your daemon does not support creating pidfiles, just don't use the
> PIDFile= option in the first place...
> 
> > Am I right in thinking that LCDd is so old that it hasn't been written
> > with systemd in mind so does not support PIDFile?
> 
> No; it's almost the opposite. Pidfiles have been in use for several decades
> with sysvinit (they were one of the primary methods of service
> identification), but became practically optional with systemd's
> cgroup-based tracking.

Thanks for your comments.


Regards, Steve Goodey
Colchester, England
mailto://steve@goodey.org
Registered Linux User #372670 http://counter.li.org

Hello to Jason Isaacs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180221/71ccfe8a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 372670.png
Type: image/png
Size: 5378 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180221/71ccfe8a/attachment-0001.png>


More information about the systemd-devel mailing list