Date: Wed, 29 Aug 2012 21:30:36 -0400 From: Steve Wills <swills@FreeBSD.org> To: obrien@FreeBSD.org Cc: ruby@FreeBSD.org, freebsd-rc@FreeBSD.org Subject: Re: procname when ruby is used Message-ID: <503EC23C.30601@FreeBSD.org> In-Reply-To: <20120829223318.GA32596@hub.freebsd.org> References: <503E6D62.3000101@FreeBSD.org> <503E6FF8.60706@FreeBSD.org> <503E742D.3030801@FreeBSD.org> <20120829223318.GA32596@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/29/12 18:33, David O'Brien wrote:
> On Wed, Aug 29, 2012 at 03:57:33PM -0400, Steve Wills wrote:
>> name="mcollectived"
>> command="%%PREFIX%%/sbin/${name}"
>> read procname <"${command}"
>> procname="%%PREFIX%%/bin/${procname##*/}"
> 
> Wouldn't this work?
> 
> name="mcollectived"
> command="%%PREFIX%%/sbin/${name}"
> procname="%%PREFIX%%/bin/${command##*/}"
> 
> (For example, "${0##*/}" is basename of a shell script's full path name)
> 
No, the process looks like this:
/usr/local/bin/ruby19 /usr/local/sbin/mcollectived -p
/var/run/mcollectived.pid
But depending on what version of ruby is used or what ${RUBY} is set to,
the "ruby19" part could be something different such as "ruby18", "jruby"
or "rbx" (rubinius).
Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?503EC23C.30601>
