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 D401D198005 for ; Sat, 23 Mar 2013 18:57:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 219D8E06CC; Sat, 23 Mar 2013 18:57:31 +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 4240CE06B1 for ; Sat, 23 Mar 2013 18:57:30 +0000 (UTC) Received: from [192.168.1.99] (pool-173-71-200-251.clppva.fios.verizon.net [173.71.200.251]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: abcd) by smtp.gentoo.org (Postfix) with ESMTPSA id 0675733DB6E; Sat, 23 Mar 2013 18:57:28 +0000 (UTC) Message-ID: <514DFB16.9060701@gentoo.org> Date: Sat, 23 Mar 2013 14:57:26 -0400 From: Jonathan Callen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 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 To: gentoo-dev@lists.gentoo.org CC: Alec Warner , =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Subject: [gentoo-dev] Re: [PATCH 1/2] Introduce multibuild_merge_root() to merge interim installs. References: <20130323172532.1b1100e2@pomiocik.lan> <1364055998-23674-1-git-send-email-mgorny@gentoo.org> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: e1a89722-40a9-41de-a106-f74b6d07d6bc X-Archives-Hash: 56b76837650495b4d5335d1eeb9d927f -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 03/23/2013 01:44 PM, Alec Warner wrote: > On Sat, Mar 23, 2013 at 9:26 AM, Michał Górny > wrote: >> + # Close the lock file when we are done >> with it. + # Prevents deadlock if we aren't >> in a subshell. + eval "exec ${lock_fd}>&-" > > Not following this bit. > > 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. Nor does it > say it closes any file descriptors. > The relevant section of bash(1) is reproduced below: Duplicating File Descriptors The redirection operator [n]<&word is used to duplicate input file descriptors. If word expands to one or more digits, the file descriptor denoted by n is made to be a copy of that file descriptor. If the digits in word do not specify a file descriptor open for input, a redirection error occurs. If word evaluates to -, file descriptor n is closed. If n is not specified, the standard input (file descriptor 0) is used. The operator [n]>&word is used similarly to duplicate output file descriptors. If n is not specified, the standard output (file descriptor 1) is used. If the digits in word do not specify a file descriptor open for output, a redirection error occurs. As a special case, if n is omitted, and word does not expand to one or more digits, the standard output and standard error are redirected as described previously. While the outcome of n>&- is not specified directly in the man page, it is treated exactly as n<&- is. - -- Jonathan Callen -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJRTfsWAAoJELHSF2kinlg4MO0P+wTQovWzYdfSgUP8H4WFmO1y fpERqd1ZIoPle5Gl5+IUOWIHoMqkjS3mIAYUKF9cYwkufHRjbIs9l6NFGZg4wbRj baCW6dRTbnbaM/YSiHLlstb4I5fcSwldwhtJrMuO9O6qLq2IFupJYkaSLnYJMs6C HspU9W+bw4Vuvlk2wnhjGDGUj06ZIifQEOE6NYUVqF4GQaZlZpCsgA5BADPQL8zL RAb90dJuRIuPPwgzuFka1+h0z4Sg5xxSlV7FS4c+r+HzrZCHHIHSyi9lOpOPB/8M P+ZzJyDD3weW5AnAIuDjhJ3Rt0wI/2oYRRoVmC6hZ1CNSZuSjUCdWi6jvIvg99cR TscJ0dKBl7bMcrrIILcXYgHtyKC/QRZWp6r0JxqOwX4L7FbPhF3qbtano+TxoCSr X7hfCuRab1FEPE+jXeprH0c+N31SHrVBxfkJDG39MVx8hdJqXYzKCXah5/6lMJ63 Td2lc7Y3UBuXpxvQBoBCWTEV3vmKBrNX6v5Bu9TTLmrhfkcMsjCMX6TdU54tUoEU YE37njpI4Thsl24/LPQtzkR8v9fVyYqVvvXylSq5HcM48VlqlhcI/EP0SRo9eUXu CFRkwb7u5nX4YOdUMj+L0P59/N7Zobdfs/dCvGB4PDeJTqzFJowxVhm7Dh1Uxf6l a1CBWFm9+S7kUPDTfwV6 =tFvf -----END PGP SIGNATURE-----