[mythtv-users] mythbackend pid

David George david at thegeorges.us
Thu Jul 5 12:52:11 UTC 2007


On 07/05/2007 08:42 AM, A JM wrote:
> I've just been running from the CL using mythbackend... I thought the
> running of the process itself should create a PID? strange, is that
> not normal...
>   

No, it isn't strange.  It all depends on how the developer wrote the 
program.  Daemons do not need to write a pidfile.  The OS doesn't need 
them.  They are mostly a convenience for init script writers.

> So, if I run from the CL "mythbackend -p /var/run/mythbackend.pid"
> then I should be good to go?? will an abandoned PID file then be
> removed from /var/run after a backend crash?
>   

That isn't how it works.  Nothing will remove the pid file on crash.  
What you do is read the pid file if it exists and then check to see if 
the process is running.  Probably the easiest way to see if the process 
is still running in linux is to see if the PID exists as a directory in 
/proc.

-- 
David



More information about the mythtv-users mailing list