From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22948 invoked from network); 3 Dec 2020 17:21:47 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 3 Dec 2020 17:21:47 -0000 Received: (qmail 19450 invoked by uid 89); 3 Dec 2020 17:22:10 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 19443 invoked from network); 3 Dec 2020 17:22:10 -0000 From: "Laurent Bercot" To: "Casper Ti. Vector" , supervision@list.skarnet.org Subject: Re: s6-supervise: use of nosetsid Date: Thu, 03 Dec 2020 17:21:44 +0000 Message-Id: In-Reply-To: References: Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.0.3385.0 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudeiiedgleelucetufdoteggodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfrhgfgggtgfesthhqredttderjeenucfhrhhomhepfdfnrghurhgvnhhtuceuvghrtghothdfuceoshhkrgdqshhuphgvrhhvihhsihhonhesshhkrghrnhgvthdrohhrgheqnecuggftrfgrthhtvghrnheptddufeegueelfefhheetjeeufeejvedvffffleegieeludegvdeffeetudehiefhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht >dcron crashes without it, which is why [1] exists. The log says >`setpgid: Operation not permitted'. I have not investigated further. The problem happens here: https://github.com/dubiousjim/dcron/blob/master/main.c#L272 dcron assumes that it's not a session leader when run in the=20 foreground. This is a programming error that should be reported and fixed; if setpgid(0, 0) fails with EPERM, it just means that the process is already a session leader, and the program should simply keep running instead of exiting. So, not a valid reason. ;) As a workaround, you can avoid nosetsid by just running dcrond under execline's 'trap', or a shell, or basically any program that will just forward signals to it. -- Laurent