From owner-freebsd-ports@FreeBSD.ORG  Tue Apr 12 08:45:53 2011
Return-Path: <owner-freebsd-ports@FreeBSD.ORG>
Delivered-To: ports@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24050106566B;
	Tue, 12 Apr 2011 08:45:53 +0000 (UTC)
	(envelope-from jhellenthal@gmail.com)
Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com
	[209.85.214.182])
	by mx1.freebsd.org (Postfix) with ESMTP id C1CA18FC0A;
	Tue, 12 Apr 2011 08:45:52 +0000 (UTC)
Received: by iwn33 with SMTP id 33so7832628iwn.13
	for <multiple recipients>; Tue, 12 Apr 2011 01:45:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:date:from:to:cc:subject:message-id
	:mime-version:content-type:content-disposition:x-openpgp-key-id
	:x-openpgp-key-fingerprint:x-openpgp-key-url;
	bh=vJzVRkiv4b/n/vG+aDsUlmdS0LFKUxrO+eR1B+R+Bmw=;
	b=UBkokxtTxhJoNvQQnP17SqG+HjOZntQKsAaIRIDS/72imU+P4aCkppI1xdX3QSYKll
	6fbDogLavaQfIIyqh64XvPk7LBEwx43fccA0aMzvNHh/3EPDacIj4lJCRwZ1ZPYeRI9f
	T3e30V/Bq9wO2xyVdJjwDJHJVjZdyWW8GOXQE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:date:from:to:cc:subject:message-id:mime-version:content-type
	:content-disposition:x-openpgp-key-id:x-openpgp-key-fingerprint
	:x-openpgp-key-url;
	b=A5fOay3PzgvpZxuc3wzsm8mfw3ORQM2xMej5E0qdpCJxcVUVkuhKki3thqy+5KazmJ
	SzF+lb9ime+Z1WbO4PWgmbuPrn8YPqhPZu//YvJu4tQaXFcsQR6J4dpen4JDjgx9MWKe
	/uLmb8NadboREOYvXQ2dGQkoDpvzjS3pncRFQ=
Received: by 10.42.141.202 with SMTP id p10mr10387267icu.124.1302597555507;
	Tue, 12 Apr 2011 01:39:15 -0700 (PDT)
Received: from DataIX.net (adsl-99-181-151-134.dsl.klmzmi.sbcglobal.net
	[99.181.151.134])
	by mx.google.com with ESMTPS id 13sm4799493ibo.8.2011.04.12.01.39.13
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 12 Apr 2011 01:39:14 -0700 (PDT)
Sender: "J. Hellenthal" <jhellenthal@gmail.com>
Received: from DataIX.net (localhost [127.0.0.1])
	by DataIX.net (8.14.4/8.14.4) with ESMTP id p3C8dANM095334
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 12 Apr 2011 04:39:11 -0400 (EDT)
	(envelope-from jhell@DataIX.net)
Received: (from jhell@localhost)
	by DataIX.net (8.14.4/8.14.4/Submit) id p3C8d7Fb095332;
	Tue, 12 Apr 2011 04:39:07 -0400 (EDT)
	(envelope-from jhell@DataIX.net)
Date: Tue, 12 Apr 2011 04:39:05 -0400
From: "J. Hellenthal" <jhell@DataIX.net>
To: dougb@freebsd.org
Message-ID: <20110412083905.GA94801@DataIX.net>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="qlTNgmc+xy1dBmNv"
Content-Disposition: inline
X-OpenPGP-Key-Id: 0x89D8547E
X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE  B12A 9057 8789 89D8 547E
X-OpenPGP-Key-URL: http://bit.ly/0x89D8547E
Cc: ports@freebsd.org
Subject: portmaster patch, nice -> renice
X-BeenThere: freebsd-ports@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
	<mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports>
List-Post: <mailto:freebsd-ports@freebsd.org>
List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
	<mailto:freebsd-ports-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Apr 2011 08:45:53 -0000


--qlTNgmc+xy1dBmNv
Content-Type: multipart/mixed; boundary="0F1p//8PRICkK4MW"
Content-Disposition: inline


--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


Hi Doug,

Not that this is much a improvement but thought youd like to be informed
of it. I usually try to refrain whenever possible from calling utilities
like nice(1) or renice(1)  and let processes inherit their niceness be
inherited from the parent process. This patch does that very thing for
portmaster.


Regards,

--=20

 J. Hellenthal


--0F1p//8PRICkK4MW
Content-Type: text/x-diff; charset=us-ascii
Content-Description: Patch to renice instead of double nice.
Content-Disposition: attachment; filename="portmaster-3.7.1.patch"
Content-Transfer-Encoding: quoted-printable

--- portmaster.orig	2011-04-12 04:05:16.000000000 -0400
+++ portmaster	2011-04-12 04:15:54.000000000 -0400
@@ -3,6 +3,7 @@
 # Copyright (c) 2005-2011 Douglas Barton, All rights reserved
 # Please see detailed copyright below
=20
+renice -n 10 -p $$
 trap trap_exit INT
=20
 # Initialize crucial values for the parent, and export them for the childr=
en
@@ -269,7 +270,7 @@
 pm_kill   () { /bin/kill $* >/dev/null 2>/dev/null; }
 pm_make   () { ( unset -v CUR_DEPS INSTALLED_LIST PM_DEPTH build_l;
 		 unset -v MASTER_RB_LIST;
-		 /usr/bin/nice /usr/bin/make $PM_MAKE_ARGS $*; ); }
+		 /usr/bin/make $PM_MAKE_ARGS $*; ); }
 pm_make_b () { /usr/bin/make $PM_MAKE_ARGS BEFOREPORTMK=3Dbpm $*; }
 pm_mktemp () { /usr/bin/mktemp -t f-${PM_PARENT_PID}-$1 ||
 		fail "mktemp for $1 failed"; }
@@ -281,7 +282,7 @@
 pm_install_s      () { $PM_SU_CMD /usr/bin/install -p -o root -g wheel -m =
644 $1 $2; }
 pm_make_s         () { ( unset -v CUR_DEPS INSTALLED_LIST PM_DEPTH build_l;
 			 unset -v MASTER_RB_LIST;
-			 $PM_SU_CMD /usr/bin/nice /usr/bin/make $PM_MAKE_ARGS $*; ); }
+			 $PM_SU_CMD /usr/bin/make $PM_MAKE_ARGS $*; ); }
 pm_mkdir_s        () { $PM_SU_CMD /bin/mkdir -p $1; }
 pm_pkg_delete_s   () { $PM_SU_CMD /usr/sbin/pkg_delete $*; }
 pm_rm_s           () { $PM_SU_CMD /bin/rm $*; }

--0F1p//8PRICkK4MW--

--qlTNgmc+xy1dBmNv
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
Comment: http://bit.ly/0x89D8547E

iQEcBAEBAgAGBQJNpA+pAAoJEJBXh4mJ2FR+IbYH/0Vi157rIWiPhNIiEsT1nEb4
PY7F4fkW/vB8qoWIEuyiu3CYesaS3dXeC5SZJnJehLrAvpx+Es0wxW7i4HHZjU5v
Vba1FXlUdubmGw1OqL7QHmB2yj9b2MgA0mvWJ38C/MK9FuL2zxgyK7ixzPlZWzbG
zhzy9ewQxgEzQp1LM3/VVUqvd+aHKUEnb85/6r/OvFxgBWSgPr1sq9rMh9dt1btN
dpaY2hHlRB/Vn9D67b/ia1Zc502t/KYETyhR2tWZR2BdE6dz42R9VDnUYQ/yAD0H
IfMibiPQ51MP7yVVZNEuuAWRmhjbDRZsHDjKsVnRR4mL/xqcHG7QAK2VlMHGSNs=
=DXaZ
-----END PGP SIGNATURE-----

--qlTNgmc+xy1dBmNv--