How to capture pid of a linux daemon run from init.d

Posted by Sirish Kumar on Stack Overflow See other posts from Stack Overflow or by Sirish Kumar
Published on 2010-04-29T08:54:09Z Indexed on 2010/04/29 8:57 UTC
Read the original article Hit count: 253

Filed under:
|

I have started a service daemon , by running the binary(written in C++) through script file stored rc5.d .

But I am not sure how to capture the pid of the daemon process and store it in pid file in /var/run/.pid . So that I can use the pid for termination. How can I do this?

© Stack Overflow or respective owner

Related posts about pid

Related posts about linux