On Thu, 3 Nov 2011 04:45:11 Roger Oberholtzer wrote:
On Wed, 2011-11-02 at 17:36 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
I want to use startproc to start more than one instance of a program in an rc script. Is this possible? It seems that it ignores any subsequent starts of the binary if it has already started it once. None of the option for startproc seemed to matter. If I make a link to the binary with a different name and use that, then I get another proc running. Have I missed something?
Hi Roger,
the man page says:
For the possibility of having two different sessions of one binary program, the option -i ignore_file allows to specify a pid file which pid number is used to ignore all processes of corresponding process session.
On 11.2, where I am running this, the man page rather confusingly only says this about the option:
-i ignore_file The pid found in this file is used as session id of the same binary program which should be ignored by startproc. Obviously this option does not work if option -f is specified.
I see words. But they don't really say anything to me...
Your explanation provided more insight. Thanks.
But I am still unclear on this. Should I give it the pid file controlling the first instance of the binary, which was made by the first instance of startproc? Since I leave making that file to startproc, how would I find out the name it used? Or is this something else?
That is how I understand it from what I've read in your posts (although I've little idea how to actually implement it). I'd suggest you many need multiple entries in /etc/rc.d/init.d (e.g. 51- <process>.rc, 52-<process>.rc...n-<process>.rc). I'd see the flow something like: -start first instance -check for running instance -get pid of running instance -start second instance with -i <pid of running instance> - repeat for subsequence instances YMMV. I've never tried it - just guessing from the rather cryptic documentation snippets you've posted. HTH. Rodney. -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org