Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2011 04:39:05 -0400
From:      "J. Hellenthal" <jhell@DataIX.net>
To:        dougb@freebsd.org
Cc:        ports@freebsd.org
Subject:   portmaster patch, nice -> renice
Message-ID:  <20110412083905.GA94801@DataIX.net>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110412083905.GA94801>