From owner-freebsd-ruby@FreeBSD.ORG Thu Aug 30 01:30:42 2012 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C7CA1065670; Thu, 30 Aug 2012 01:30:41 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) by mx1.freebsd.org (Postfix) with ESMTP id 7EC948FC08; Thu, 30 Aug 2012 01:30:41 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.5/8.14.5) with ESMTP id q7U1T5ar008260 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Wed, 29 Aug 2012 21:29:06 -0400 (EDT) (envelope-from swills@FreeBSD.org) Message-ID: <503EC23C.30601@FreeBSD.org> Date: Wed, 29 Aug 2012 21:30:36 -0400 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120604 Thunderbird/12.0.1 MIME-Version: 1.0 To: obrien@FreeBSD.org References: <503E6D62.3000101@FreeBSD.org> <503E6FF8.60706@FreeBSD.org> <503E742D.3030801@FreeBSD.org> <20120829223318.GA32596@hub.freebsd.org> In-Reply-To: <20120829223318.GA32596@hub.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [199.48.129.64]); Wed, 29 Aug 2012 21:29:06 -0400 (EDT) X-Spam-Status: No, score=0.0 required=4.5 tests=none autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mouf.net X-Virus-Scanned: clamav-milter 0.97.5 at mouf.net X-Virus-Status: Clean Cc: ruby@FreeBSD.org, freebsd-rc@FreeBSD.org Subject: Re: procname when ruby is used X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 01:30:42 -0000 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