From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 10:25:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 302191065673 for ; Tue, 2 Dec 2008 10:25:05 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id BDF9B8FC21 for ; Tue, 2 Dec 2008 10:25:04 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2190207fgb.35 for ; Tue, 02 Dec 2008 02:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=6i1BqQ4Unl89/HAfhpEgodk0+xoDFaaKoXYduSnJx/c=; b=exHB3Jc+o58kkYn9p7qltX5GJhO+nVVZzbH8w/VW3A7hpndwaYMTggQyuwYV+zCDsH q8wAPU14+mObm8HnzKZJ4jgWdHJwS87qPQ8lafYfci4GKoWYBS/NT/FHACuQfCsXaLkU Obdn7q4+KxqQTPFVPu/ZnnjvFh7vtQoYipfY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=F0FyVxtCHL7NMAjE4pWiZ+o4OmP+qiJZ8bJu5yMr+JytTFY+tQBP9iLOJR0Og1n2R6 FrM0K75sbcyHGKDwGQXdGGVacwXJwg2P2Bi5ysWUE6yHR1nIaNYlxSvopEq1Xz5YeMEO moIAXzY0vlwYGJ349wTW+Amt7PYBrnRgDPV7U= Received: by 10.181.144.10 with SMTP id w10mr4219252bkn.30.1228211589244; Tue, 02 Dec 2008 01:53:09 -0800 (PST) Received: by 10.181.13.12 with HTTP; Tue, 2 Dec 2008 01:53:09 -0800 (PST) Message-ID: <319cceca0812020153y6cde7b0ara2cff1d1b0525e10@mail.gmail.com> Date: Tue, 2 Dec 2008 09:53:09 +0000 From: Maslan To: "FreeBSD Hackers" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Controlling a process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 10:25:05 -0000 Hi guys, What is the best way to control a process (running in chroot env): 1- Execution time 2- Memory limit And to be able to kill the process when it breaks this limits. Finally, i would like to know the exit status of the process or the signal that killed it (sigfault, .....) The idea is that I'm developing a problem judge that runs FreeBSD (something like www.spoj.pl or topcoder.com/tc) Where every problem has a run-time and a memory limit. Thanks a lot -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de