Date: Mon, 7 Jan 2008 13:15:28 +0000 From: "Igor Mozolevsky" <igor@hybrid-lab.co.uk> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: Kostik Belousov <kostikbel@gmail.com>, Peter Jeremy <peterjeremy@optushome.com.au>, freebsd-current@freebsd.org Subject: Re: sbrk(2) broken Message-ID: <a2b6592c0801070515g37735475kc0922af8f93723ca@mail.gmail.com> In-Reply-To: <9113.1199700321@critter.freebsd.dk> References: <20080107095853.GR947@server.vk2pj.dyndns.org> <9113.1199700321@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/01/2008, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: > In message <20080107095853.GR947@server.vk2pj.dyndns.org>, Peter Jeremy writes: > > >>This is a non-starter, if SIGDANGER is to have any effect, all > >>processes that use malloc(3) should react to it. > > > >This depends on what SIGDANGER is supposed to indicate. IMO, a single > >signal is inadequate - you need a "free memory is less than desirable, > >please reduce memory use if possible" and one (or maybe several levels > >of) "memory is really short, if you're not important, please die". > > That's what I have been advocating for the last 10 years... That makes the userland side of unnecessarily overcomplicated. If a process handles SIGDANGER then let it do so and assume it's important enough to be left alone, if a process doesn't handle SIGDANGER then send SIGTERM to them then SIGKILL; but in any case SIGTERM *should* precede SIGKILL - the processes ought to be allowed to terminate gracefully. Igor :-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a2b6592c0801070515g37735475kc0922af8f93723ca>