From owner-freebsd-hackers Sun Feb 3 23:53:58 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from relay1.macomnet.ru (relay1.macomnet.ru [195.128.64.10]) by hub.freebsd.org (Postfix) with ESMTP id 3A79537B41B for ; Sun, 3 Feb 2002 23:53:53 -0800 (PST) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay1.macomnet.ru (8.11.3/8.11.3) with ESMTP id g147rnO6362838; Mon, 4 Feb 2002 10:53:49 +0300 (MSK) Date: Mon, 4 Feb 2002 10:53:48 +0300 (MSK) From: Maxim Konovalov To: Magdalinin Kirill Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: how to count number of user process? In-Reply-To: Message-ID: <20020204105308.L66803-100000@news1.macomnet.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=KOI8-R Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 10:11+0300, Feb 4, 2002, Magdalinin Kirill wrote: > Hello, > > can anyone give an idea of C code on how to quickly count > the number of processes for a given user? I want to patch > Apache in order to prevent it from forking new process > over user's maxproc limit (while running suexec). > > Should I look at ps(1) source code or there are some > other examples? take a look at src/usr.bin/killall/killall.c > thanks, > > Kirill Magdalinin > bsdforumen@hotmail.com > > _________________________________________________________________ > Join the world’s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > > -- Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message