Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 9 Dec 2002 07:19:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 9 Dec 2002 07:19:42 -0500 Received: from 5-048.ctame701-1.telepar.net.br ([200.193.163.48]:27359 "EHLO 5-048.ctame701-1.telepar.net.br") by vger.kernel.org with ESMTP id ; Mon, 9 Dec 2002 07:19:41 -0500 Date: Mon, 9 Dec 2002 10:27:04 -0200 (BRST) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Peter Chubb cc: Rusty Trivial Russell , Linus Torvalds , "" , Kingsley Cheung Subject: Re: [TRIVIAL] Re: setrlimit incorrectly allows hard limits to exceed soft limits In-Reply-To: <15860.1070.521840.791396@wombat.chubb.wattle.id.au> Message-ID: References: <15860.1070.521840.791396@wombat.chubb.wattle.id.au> X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 836 Lines: 23 On Mon, 9 Dec 2002, Peter Chubb wrote: > Rik> Wouldn't it be better to simply take the soft limit down to > Rik> min(new_rlim.rlim_cur, new_rlim.rlim_max) ? > > Single unix spec says to return EINVAL in this case. > > [EINVAL] > An invalid resource was specified; or in a setrlimit() call, the new > rlim_cur exceeds the new rlim_max. So how about "the old rlim_cur exceeds the new rlim_max" ? ;) Rik -- Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://guru.conectiva.com/ Current spamtrap: october@surriel.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/