Date: Thu, 28 Jan 2016 20:04:42 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Adrian Chadd <adrian.chadd@gmail.com>, Marcelo Araujo <araujo@freebsd.org> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: syslogd(8) with OOM Killer protection Message-ID: <56AA11EA.1060903@grosbein.net> In-Reply-To: <CAJ-Vmomhzg5CCNdTVhecC8n3xMsvHODfG_k35mi6n0ftmikPOw@mail.gmail.com> References: <CAOfEmZgzL2Ldu53CeSsKcUe00H1VAukhEopSUmpUK0=XAhsD1A@mail.gmail.com> <CAJ-Vmomhzg5CCNdTVhecC8n3xMsvHODfG_k35mi6n0ftmikPOw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27.01.2016 13:32, Adrian Chadd wrote: > I like it,how's it not done via some command line tool that we can run > any tool with? I've already responded to such idea in a comment to my original PR and like to repeat it here. IMHO, it is nearly impossible to correctly implement such protection for arbitrary daemonizing service by means of rc.subr, without modifications of service source code. Currently. We do have protect(1) utility but it only can protect single process it starts or all current/future children of started process and for daemons both cases are wrong: - protection of single process is meaningless because it forks to become daemon and that ceases protection; - protection of all future children is dangerous for daemons capable of running arbitrary subprocesses like syslogd can with "vertical bar" syntax of syslog.conf(5) as those future children may be "runaway" memory hogs. Perhaps, we could have kernel facility that keeps decreasing counter of forks and ceases protection of children when counter reaches zero level. Then teach protect(1) to (re-)set counter value and make rc.subr use it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56AA11EA.1060903>