NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How can I stop a script running as "deamon" from rc.d?



On Sun, Dec 26, 2010 at 6:22 PM, Steven Bellovin 
<smb%cs.columbia.edu@localhost> wrote:
>
>> Yes, I can see, that a C-program can set a PID file, and when it dies,
>> the PID-file is removed
>> automatically.  Can a script set one?  How?
>> If I could, I probably must remove the PID-file in my trap-part.  If
>> one stays there after a crash,
>> i can remove remove it before creating.
>
> command &
> echo $! >/var/run/command.pid
>
>                --Steve Bellovin, http://www.cs.columbia.edu/~smb
Thank You!  That is the idea, I missed-

Hans


Home | Main Index | Thread Index | Old Index