[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    correct pid-file behaviour
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2003-04-28 20:34:56
[Download RAW message or body]

Hi,

a user of the lisa daemon(kdenetwork/lanbrowsing/lisa) asked for a pid-file 
feature for lisa.
How do I implement this correctly ?

What should be the name ? (I guess lisa.pid)
Where should I create it ? On my system a bunch of pidfiles are under 
/var/run/. Are there other places where it could live ? On other unices ?

AFAIK a pidfile is a simple text file which contains the pid of the daemon 
process. I guess I should create it as soon as the daemon starts and write 
the pid and delete it when the daemon is killed ?
Then the pidfile will be left over when the daemon was killed by SIGKILL. Is 
this the correct behaviour ?

Any more things to take care of ?
I guess "normal" ownership and 0644 permissions should be ok, right ?

Bye
Alex
-- 
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org                - http://www.kde.org
      alex@neundorf.net               - http://www.neundorf.net

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic