From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2708 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Casper Ti. Vector" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: The "Unix Philosophy 2020" document Date: Mon, 25 Nov 2019 22:20:47 +0800 Message-ID: <20191125142047.sbewkum5jj3fckvi@CasperVector> References: <20190831130730.ki6ma7i5curucowe@CasperVector> <20190901091157.bjtfhqq6d2rg75yo@CasperVector> <20190927083816.tectynx7dzlfcvb7@CasperVector> <20191012173743.drzlgnrw4hib6hh4@CasperVector> <20191117062644.lt6wfmqwijqqhc5w@CasperVector> <20191117072850.bokuozrpokvfq662@CasperVector> <20191125025202.oqu4ennu3lexnxsa@CasperVector> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="81358"; mail-complaints-to="usenet@blaine.gmane.org" Cc: j.deboynepollard-newsgroups@ntlworld.com To: supervision@list.skarnet.org Original-X-From: supervision-return-2297-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Nov 25 15:20:59 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iZFEW-000Kws-DX for gcsg-supervision@m.gmane.org; Mon, 25 Nov 2019 15:20:56 +0100 Original-Received: (qmail 19861 invoked by uid 89); 25 Nov 2019 14:21:20 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 19854 invoked from network); 25 Nov 2019 14:21:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=hRwJAch3wUwkrfsfpa8qN3mOm/vDnAOznGgeaBfiqqE=; b=f3XjPBiwGWvxK3shDb51OX4Ltex1GPWK7nOW60Fdjocvznw5R88HsZEpfTa4GWJBkG 8uoYCJjG/1rGpsfs7UmQzWrJ8DastR89yMO0tzxAF/WQOedtH0+BmPJm6teiUV0ZFdt8 dZ6LmWxxKupvmtMA7FKglsM7h1pWdLuZkx1xLXbldn+TH+DW3jDYDX1gGVSeq485PoTK vkMNso0GoZ/2aBVBnrMtGI2m6WLc2DwwDIfGnu5+57b3bkYQeMo0jp6IItUHmHrOV6yt T9uEK3uIF35iw73QO2Rc56iVYjk5tz8AW6DNbtFH3HUyMZO8Nz3VRa0oZWJyOQFt0eO7 Y/Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=hRwJAch3wUwkrfsfpa8qN3mOm/vDnAOznGgeaBfiqqE=; b=BXJ9Q7Acf24MCTDmRkPkaHASVPMDB7PDZftjFZIIC4b4vJMtY2kj4B5Im/0EaCUgQQ X9tVb/2S0amFuO3O9EKRfFnRIp8FqXy9mE0Ctu14B8n9ZmnHjw4Qpf9VGyVpPwR4IHit faspq/za+yqZSq4hfqToxyqgCVHuPEja9H7++wBehDCMkfAytaJNeMRB13Rc8rPij7ry tHcxTXbyW3T57IpN7aEnfb8EFCRsO+U0lvHs/lwCIFmWJ2s4eKkmUukzUe9lJXKduCXt HMIwEFDGoIngixER7Bd3gCHJSNa9w7nVFOKq3gbDwtd8J6p4mBZDNQ63QuCvf9JilNec SMUw== X-Gm-Message-State: APjAAAVjZtbIdUkKfg2SLrVh/NNcyGZLKQklQho9djKOfkHw80WdDonB tlvO9nWETcfVHOn3F6wXwKuNvv4i X-Google-Smtp-Source: APXvYqxZOcYtZHwsRsiaSr+Besnkd7/dGtO7Ip2u0kd+KSEfnJoiQEyknoU6JOHq2P21E1q5Vehktg== X-Received: by 2002:a63:1c5c:: with SMTP id c28mr32229267pgm.241.1574691652150; Mon, 25 Nov 2019 06:20:52 -0800 (PST) X-Google-Original-From: "Casper Ti. Vector" Mail-Followup-To: supervision@list.skarnet.org, j.deboynepollard-newsgroups@ntlworld.com Content-Disposition: inline In-Reply-To: <20191125025202.oqu4ennu3lexnxsa@CasperVector> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2708 Archived-At: On Mon, Nov 25, 2019 at 10:52:02AM +0800, Casper Ti. Vector wrote: > Macros and/or helper functions (again cf. [1]; they can be factored into > a mini-library in nosh) can also be used to reduce boilerplate like > > const int error(errno); > > std::fprintf(stderr, ..., std::strerror(error)); > > throw EXIT_FAILURE; > which can be easily observed after the attached patch is applied. The first chunk in the patch is incorrect, and the new code should be (in other words, swap the `ENOENT == error' and the `const int' lines) > if (!self_cgroup) { > if (ENOENT == error) return; // This is what we'll see on a BSD. > const int error(errno); > std::fprintf(stderr, "%s: FATAL: %s: %s\n", prog, "/proc/self/cgroup", std::strerror(error)); > throw EXIT_FAILURE; > } I am very sorry for that. -- My current OpenPGP key: RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19) 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C