From owner-freebsd-hackers Sun Feb 3 23:11:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from hotmail.com (f138.pav1.hotmail.com [64.4.31.138]) by hub.freebsd.org (Postfix) with ESMTP id D379737B422 for ; Sun, 3 Feb 2002 23:11:45 -0800 (PST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 3 Feb 2002 23:11:45 -0800 Received: from 212.30.183.204 by pv1fd.pav1.hotmail.msn.com with HTTP; Mon, 04 Feb 2002 07:11:45 GMT X-Originating-IP: [212.30.183.204] From: "Magdalinin Kirill" To: freebsd-hackers@freebsd.org Subject: how to count number of user process? Date: Mon, 04 Feb 2002 10:11:45 +0300 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 04 Feb 2002 07:11:45.0761 (UTC) FILETIME=[34796D10:01C1AD4B] 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 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? 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