From owner-freebsd-questions@freebsd.org Thu May 26 08:06:28 2016 Return-Path: Delivered-To: freebsd-questions@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 72A28B4B023 for ; Thu, 26 May 2016 08:06:28 +0000 (UTC) (envelope-from adam.lindberg@wooga.net) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FEF91BC7 for ; Thu, 26 May 2016 08:06:28 +0000 (UTC) (envelope-from adam.lindberg@wooga.net) Received: by mail-wm0-x236.google.com with SMTP id z87so88943822wmh.0 for ; Thu, 26 May 2016 01:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wooga-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sDuRJp7Sk5YEZD8yI9uu0yPM4JQJgnBB0FpxhWMBOTM=; b=O+E229lPe0gDvxKKfTh49H5MnRKn39Af89VyLeO/kOZ2yKIFRrHMhH5AkyXj4GhZ9q JZojMevbS0qbC3GmVxaDI/lXeoj7ARjEpnYjdEAIFFiYUImg9zNzTPCnrTVS8hah63D9 neY6YO1zFn3qJHIGqZ02cDuKVK6Uv/Bii2x3h9qYlz+SiCDyvQ/x17MP25vTyEkKwGL8 ojwcr9zrgce07KqRc9K/PUs3yk/RIeLYqt+y06z6rK2Ytx4zKSWLS17DGyFqVYtpqaLl zRL8QLPVBH7tIIl3r3dhfCnQjlKWrp6H9JZhC6HV4uxq8CR+QUF9HuCDxmIZdj9xi5Zk 6Hmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sDuRJp7Sk5YEZD8yI9uu0yPM4JQJgnBB0FpxhWMBOTM=; b=MH3Y4C8HqM6qN1LFYoIK5s8NgoeM4g8NuGUlvvW9uU0oosKpISgPfNkMeijr4UDnVv qmZ8hDP2I8eIjOMcWBUmlraRohkKjnuQRDH7Z4VZeusJeHUGOVKVvShGrU8itZfOugcr 3FqxEeivb56AAP7OGtCq/J3xokJ7NV8XELKBIzo7jHBRUM91Ppi1ljS710AEzaveYXI6 m6C4w/Uz47VwAc9o0YdtedQG7/ltEmAFVkIg/yPTTtI2anJHb/hBTyoR/tE0uq7GccKJ zNv3Kx7IE+xnCzcxG/9lZ3QQEs/jSIVtvki4Vxec6dJF2AarEeKHAbs0zNNMakQsP4Jw t/LA== X-Gm-Message-State: ALyK8tIIgVOumRvx9w9b1pUeyjC/21fvcVl+8yzt9d/+s0AXAyAP2VETJDNOXAe3lHqfW/PT X-Received: by 10.28.232.24 with SMTP id f24mr2298942wmh.58.1464249961749; Thu, 26 May 2016 01:06:01 -0700 (PDT) Received: from ?IPv6:2a05:4840::2:d0fb:72cc:b01b:a9e9? ([2a05:4840:0:2:d0fb:72cc:b01b:a9e9]) by smtp.googlemail.com with ESMTPSA id 131sm2163786wmu.17.2016.05.26.01.06.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2016 01:06:01 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Pidfile generated by /usr/sbin/daemon not usable by rc.d script From: Adam Lindberg In-Reply-To: <20160525202656.71f51c86@gumby.homeunix.com> Date: Thu, 26 May 2016 10:06:00 +0200 Cc: freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3B43299B-FFC3-4B02-A6BB-74C6449874C4@wooga.net> References: <1249E74D-FB34-4FF3-B670-38D80B1B07AF@wooga.net> <20160525141347.7e82622e@gumby.homeunix.com> <20160525142724.7ccadc4e@gumby.homeunix.com> <20160525202656.71f51c86@gumby.homeunix.com> To: RW X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 08:06:28 -0000 Okay, thanks, that makes sense. 1. Is the sed =E2=80=9Chack=E2=80=9D okay for now? Are there any risks = with modifying the pid file after it=E2=80=99s been created (too early, = too late etc.)? 2. If this is a bug in /etc/rc.subr, how do I report it? I=E2=80=99m new = to FreeBSD. :-) Cheers, Adam -- Adam Lindberg | Backend Engineer Wooga GmbH | Saarbr=C3=BCcker Str. 38 | D-10405 Berlin Place of business: Berlin Registered at the local court Berlin-Charlottenburg, HRB 117846 B Managing Directors: Jens Begemann, Philipp M=C3=B6ser, Jan Miczaika > On 25 May 2016, at 21:26 , RW via freebsd-questions = wrote: >=20 > On Wed, 25 May 2016 17:12:36 +0200 > Adam Lindberg wrote: >=20 >> Hi, >>=20 >> I don=E2=80=99t know what powerd is and how it factors into this. :-) >=20 > It's an example of a daemon that generates a pid file without a > newline, and yet "stop" and "status" work. >=20 > It turns out that /etc/rc.d/powerd doesn't define pidfile, in which > case rc.subr finds the pid from the output of ps. So it's not a > counter-example and it does appear to be a bug that rc.subr can't cope > with a pid file without a newline. >=20 > You could use the same method, but using sed seems safer. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"