Subject: Re: check resource limits with exec(3)?
To: Jeremy C. Reed <>
From: Greg A. Woods <>
List: tech-userlevel
Date: 06/05/2006 19:26:56
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Mon, 5 Jun 2006 14:28:57 -0700 (PDT),
Jeremy C. Reed wrote:
> What is the procedure for checking resource limits when the process is
> started as root with a fork and then uses setuid to change user?
> Should exec(3) check if the resource limit (like maxproc) has already been
> reached?

No, it had better not do so, especially not maxproc.  Calls to the
exec() family of functions do not change the number of processes that
are running.

It is also critical that one be able to exec another program when one is
already running maxproc processes.

						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <>
Planix, Inc. <>       Secrets of the Weird <>

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: PGPfreeware 5.0i for non-commercial use
MessageID: hNRibkJpURNL/SIoDMQcIDu3m4lOJl0Y