From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7771A198005 for ; Sat, 23 Mar 2013 18:56:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 885E1E06C0; Sat, 23 Mar 2013 18:56:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A469BE06B7 for ; Sat, 23 Mar 2013 18:56:18 +0000 (UTC) Received: from pomiocik.lan (unknown [83.238.59.230]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 59B0C33DB83; Sat, 23 Mar 2013 18:56:15 +0000 (UTC) Date: Sat, 23 Mar 2013 19:57:02 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: antarus@gentoo.org Subject: Re: [gentoo-dev] [PATCH 1/2] Introduce multibuild_merge_root() to merge interim installs. Message-ID: <20130323195702.59824135@pomiocik.lan> In-Reply-To: References: <20130323172532.1b1100e2@pomiocik.lan> <1364055998-23674-1-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/C2ab9z.NiqVrkWH/_MWfIe/"; protocol="application/pgp-signature" X-Archives-Salt: ec2531e7-c55d-41a6-afce-d6622d8118f2 X-Archives-Hash: 2b2b2151bda84807d5869e69eca3f72a --Sig_/C2ab9z.NiqVrkWH/_MWfIe/ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 23 Mar 2013 10:44:59 -0700 Alec Warner wrote: > On Sat, Mar 23, 2013 at 9:26 AM, Micha=C5=82 G=C3=B3rny wrote: > > + if [[ ${lock_fd} ]]; then > > + # Close the lock file when we are done with it. > > + # Prevents deadlock if we aren't in a subshell. > > + eval "exec ${lock_fd}>&-" >=20 > Not following this bit. >=20 > The bash manpage says N>&DIGIT- redirects fd DIGIT to fd N. N may be > unspecified and defaults to 1. > It doesn't say what happens if DIGIT is unspecified. Hm, that's interesting. It looks like they forgot to document it. I've just tested it with bash-3.2 and it works as expected. > Nor does it say it closes any file descriptors. Well, if we assume that this fragment is correct, then it does: DIGIT is closed after being duplicated to N. There's also the following in bash-4.2 info page: If >&- or <&- is preceded by {VARNAME}, the value of VARNAME defines the file descriptor to close. But IMO it's more like describing a specific case, rather than introducing >&-. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/C2ab9z.NiqVrkWH/_MWfIe/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRTfr+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKSkEP/jsCqTRvwMgJTsO3/s6kGPIf UTJp3G/w8FdL/ovitchsZCV4JfRTzofUbHUM8Tuezc8FFZgj+blV5pXmcLuNUp7T Xq1OZUy5kP+J/FVdUt5tEqVyjvugHl4yQ0DdjmkcOWyNPoyRYD3lQHNslh/8BqK8 DBmdifzXKjii7ZaaToLzXT7eQYewNfVZwSQ1ZBNT7ymiH289fyl4hGrm4aVIs8sx 3Tc0Bw/2lkIzME5FF/7ZUTQS4ZiRd7g4i4fXYgk9xApi24oDIh8QCf3fNGoX8Dry 94FTCHk/f8fxOR2uNsLrXh0ZnMAaDJKdPiVluBRVg/ZLGId6sB2QOmKc8hRnm/tc ObC0SBBMhiJqBkd6kLXtYyphXG5Z6VTXoDZh+eedBHOyhLHShlHiN4mzRHisXWLk XWJS6FmLR+0trLUG8LH7gDo0Q7B0Wv2g4bV7fxkQxzE2KM7mUHdkTygvmOvBiSWr vHnZ7KxPOYxrCt62oB4iP6+LhK23nTH/A/f6Qfm1bid1z5cY8DkpVAmo+j7Qis95 8zSfGg5aweXtLybpLVSA9u+rUJfvXubDdStdUriaq8sTif9jpxTnG4ds43CRM3cH z1nECpbtlAlD5OtAX795bEhTmHgpHBUO8eBApks+BehOnoDo3FkzBcsvrB1+pKeR 6XjDA6qwASCZA4Eb0YLc =IB8W -----END PGP SIGNATURE----- --Sig_/C2ab9z.NiqVrkWH/_MWfIe/--