Subject: Re: rc.subr check_process()
To: Brook Milligan <firstname.lastname@example.org>
From: Ron Roskens <email@example.com>
Date: 02/13/2002 16:38:26
I submitted a PR (bin/15563) on something similar earlier this
I've been utilizing rc.subr on a solaris box for a number of
different applications, mostly java processes. The initial script
"/usr/bin/java" ends up execing another binary down the road,
and thats the procname you would need to look for. Its kind of
annoying to put two lines ( command & procname ) into the rc.d
script, but that was the only way I found to catch it.
On Wed, 13 Feb 2002 15:19:06 -0700 Brook Milligan
> I am trying to write some scripts for /etc/rc.d. They need to start
> other scripts. Consequently, when they run ps -ax -o 'pid,command'
> reports something like
> 270 /bin/sh /usr/pkg/bin/foo
> The /etc/rc.subr check_process() does not match this, because of the
> leading "/bin/sh". Consequently, the stop/restart/status operations
> fail. One fix is to add cases with /bin/sh to the beginning, but this
> may not scale well if scripts in other languages need this facility.
> In any case, it would be really useful if rc.subr could find scripts
> run by this mechanism.