From owner-freebsd-hackers@freebsd.org Sun Jan 31 15:33:08 2016 Return-Path: Delivered-To: freebsd-hackers@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 AAAC0A741EF for ; Sun, 31 Jan 2016 15:33:08 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-3.server.virginmedia.net (know-smtprelay-omc-3.server.virginmedia.net [80.0.253.67]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCAECDA for ; Sun, 31 Jan 2016 15:33:07 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-3-imp with bizsmtp id CfZ61s00V0HtmFq01fZ6h6; Sun, 31 Jan 2016 15:33:06 +0000 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=MtevkDue c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=uNc6XVXN_B3ltN-fNu4A:9 a=QEXdDO2ut3YA:10 To: FreeBSD Hackers References: <56AA047D.8070807@digiware.nl> From: Jonathan de Boyne Pollard Subject: Re: syslogd(8) with OOM Killer protection Message-ID: <56AE2929.304@NTLWorld.com> Date: Sun, 31 Jan 2016 15:32:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56AA047D.8070807@digiware.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 15:33:08 -0000 Eugene Grosbein: > protection of single process is meaningless because it forks to become daemon and that ceases protection; This premise is erroneous, and the conclusion that you've based upon it is erroneous too. Daemons that run under service managers do not need to fork "to become [a] daemon". Indeed, they *already are* daemons right from the start. As Jan Brankamp said elsewhere: > I would prefer to implement the a flag keeping cron (and all other base system daemons) from double-forking and run it under a process supervisor like daemontools. And as I have pointed out, this is already the case over a wide range of daemon softwares nowadays. Thus the use of "protect" is feasible, since proper service-manager-managed daemons end up as the same process as the process that ran "protect". Indeed, chain-loading utilities like "protect" are the basics of the daemontools way of doing things. There is a broad range of tools whose purpose is to affect process state in one particular aspect and then chain to another program using what's left in the argument vector. Eugene Grosbein: > Perhaps, we could have kernel facility [...] There's no need for new kernel facilities here if one uses a service manager and throws away the wrongheaded idea that daemons need to *become* daemons under their own steam. (-: