From owner-freebsd-ports@freebsd.org Tue Sep 15 05:08:05 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C04E9A0387C for ; Tue, 15 Sep 2015 05:08:05 +0000 (UTC) (envelope-from jktrigg@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id A704E1F52 for ; Tue, 15 Sep 2015 05:08:05 +0000 (UTC) (envelope-from jktrigg@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id A6439A03879; Tue, 15 Sep 2015 05:08:05 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4A9EA03878; Tue, 15 Sep 2015 05:08:05 +0000 (UTC) (envelope-from jktrigg@gmail.com) Received: from argent.heraldsnet.org (argent.heraldsnet.org [65.111.161.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "argent.heraldsnet.org", Issuer "argent.heraldsnet.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 813961F51; Tue, 15 Sep 2015 05:08:05 +0000 (UTC) (envelope-from jktrigg@gmail.com) Received: from mail.michaelines.org (localhost [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by argent.heraldsnet.org (Postfix) with ESMTPSA id 5D6B884B; Tue, 15 Sep 2015 01:00:52 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 Sep 2015 01:00:52 -0400 From: Jim Trigg To: RW Cc: ports@freebsd.org, owner-freebsd-ports@freebsd.org Subject: Re: rc script problem - pidfile not being recognised In-Reply-To: <20150914183230.16681843@gumby.homeunix.com> References: <20150911161850.402b3d5a@gumby.homeunix.com> <853047065.182.1441986957380.JavaMail.Kevin@Thoth> <20150911171930.59e67cc2@gumby.homeunix.com> <0NUI007RMV24EUD0@hades.sorbs.net> <55F367CF.2080507@sorbs.net> <20150912122759.412ea139@gumby.homeunix.com> <55f43e74.240f6b0a.25631.0d64SMTPIN_ADDED_MISSING@mx.google.com> <20150914183230.16681843@gumby.homeunix.com> Message-ID: <115923987a2a4c67898f13892ba72225@mail.michaelines.org> X-Sender: jktrigg@gmail.com User-Agent: Roundcube Webmail/1.1.2 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2015 05:08:05 -0000 On 2015-09-14 13:32, RW via freebsd-ports wrote: > On Sat, 12 Sep 2015 08:02:11 -0700 (PDT) > Roger Marquis wrote: > >> RW via freebsd-ports wrote: >> > You'd rather an rc script fails at run-time and shuts down the wrong >> > daemon than fail when the script is being developed? >> >> It's not so much where the script fails than that it fails in the >> first place. Neither a pidfile nor a command_interpreter needs to be >> required for an rc scripts to work. These are nice features but >> making them mandatory is at best a sort of premature optimization. > > It's not mandatory; you only need to define it if you want to be > able to stop an interpreted daemon using the default method. > > If you have some other way of shutting down a daemon without knowing > its > name and PID then you can just supply a stop function to do it. One easy fix would be to have stoprc first check the entire process command and then shift it by one and check again... Then it would work for both binaries and scripts without a special variable for scripts. Jim Trigg