From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 55B6D139694 for ; Fri, 14 Apr 2017 16:34:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80D31E0DF2; Fri, 14 Apr 2017 16:31:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39197E0DEC for ; Fri, 14 Apr 2017 16:31:45 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id B92B234167A; Fri, 14 Apr 2017 16:31:38 +0000 (UTC) Message-ID: <1492187495.14730.11.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] multibuild.eclass: Reap stray subjobs before exiting sub-phase From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Fri, 14 Apr 2017 18:31:35 +0200 In-Reply-To: <20170323175539.17716-1-mgorny@gentoo.org> References: <20170323175539.17716-1-mgorny@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-5plXLCbjT73SokxeyB+z" X-Mailer: Evolution 3.22.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: 07d81e4d-4f74-446b-baba-4f444c1e8997 X-Archives-Hash: a143a85f8547c798eccb667526928dd4 --=-5plXLCbjT73SokxeyB+z Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On czw, 2017-03-23 at 18:55 +0100, Micha=C5=82 G=C3=B3rny wrote: > Alike the PMS-defined phases, sub-phases do not support leaving jobs > behind. To avoid leaving something accidentally, make sure to reap all > jobs (i.e. wait) post running the command. Warn if any stray processes > are found since that indicates a bug in ebuild. > --- > eclass/multibuild.eclass | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass > index 0f89e4ec0b83..a29218d8d840 100644 > --- a/eclass/multibuild.eclass > +++ b/eclass/multibuild.eclass > @@ -125,6 +125,18 @@ multibuild_foreach_variant() { > _multibuild_run "${@}" \ > > >(exec tee -a "${T}/build-${MULTIBUILD_ID}.log") 2>&1 > lret=3D${?} > + > + # make sure no processes are left over > + local leftovers=3D > + while :; do > + wait -n > + [[ ${?} -eq 127 ]] && break || leftovers=3D1 > + done > + > + if [[ ${leftovers} ]]; then > + ewarn "The multibuild function has left one or more processes running= " > + ewarn "in the background. Please report a bug." > + fi > done > [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=3D${lret} > =20 Merged. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-5plXLCbjT73SokxeyB+z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEXr8g+Zb7PCLMb8pAur8dX/jIEQoFAljw+WdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDVF QkYyMEY5OTZGQjNDMjJDQzZGQ0E0MEJBQkYxRDVGRjhDODExMEEACgkQur8dX/jI EQofZBAAyU9v7EgSt52Y4B9GUef9ifkUb3x9X6QAEj/+mDZt7GDpP1lMLqeIbbTy DDVDHPrfVYrkHDgmULUoxsRyJBbTQLMM4iNktITByW9q8net/LGfSCMT+iry+GIA e1TvPWSzXno6ChvNNCiZAyxG5gg2cHf4mX2xSMfTI0EuoGVbidSNorBKIM58+rHD IdjMgZnaI+H/nTrLFyI+PnMzCr0IMNMWpTBaHqNWHaq4xeB/rlEMywKfVbN1rmWb HZq2xOYYWNDgmHGV67hE9hwRbP0wKLbedJTV+VQNeBosAM4PlJO5ydeeN0//XyfQ 8udnck+c/OOsSfrft2F5h5+daN63BYq1GA9/AUmD2pGe8i06DWMaSJfktIGOlou9 ejehpZr3923kklr5LB/wP4cRpRtZAYxs1DRBURJ4Q4h+Da2IV+enSc/Pj6f+dTc5 8yniwZoiaaNhMy4FMYKys0cxfrtgllnlg5OKMKle/1OynoWdEZNb41krpbPj0Tif t7DrOC29Is8pWuslrVC5XGqcv088fyf0/7SnUzqmQNAjvbXHsDKoFMAph8Rv73rG CPJLxS6kCuxoSN6H+uBJ+pimmJewOEqfBHfR/W2rwrRViXyNcRpGq3642Z0/1BIJ XPtpPyGMlDJ0pekbtWJ+g+T2MI/yr0ggpxYopC3yKB0X9b07J6I= =Uaaz -----END PGP SIGNATURE----- --=-5plXLCbjT73SokxeyB+z--