Re: [TRIVIAL] Re: setrlimit incorrectly allows hard limits to exceed soft limits

From: Rik van Riel (riel@conectiva.com.br)
Date: Mon Dec 09 2002 - 07:27:04 EST


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:  <a href=mailto:"october@surriel.com">october@surriel.com</a>
-
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/



This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:14 EST