I don't believe you can force a PID.
You can, however, use the daemon routines in perl, bash, etc. to have the application itself find whether it has a related, open PID before it takes an action like opening another instance of itself. Very common function. Check your scripts in /etc/init.d for bash examples.
What purpose had you intended for a specific PID? Perhaps you could ask THAT question?
D.E.R. Management - IT Project Management Consulting
What about the pidfile=$(PIDFILE=/var/run/httpd.pid), Doesn't that specify a PID for the process httpd?
No particular purpose, I guess it will make our application easier to identify. Say we have two daemons both uses JAVA, only distinction is different PID, and we want to kill one but not the other, it will be better if we run it with specific PID.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.