From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4939 invoked by alias); 19 Jan 2015 14:38:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19745 Received: (qmail 5646 invoked from network); 19 Jan 2015 14:38:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Kamil Dudka To: Zsh Users Subject: warning about closing an already closed file descriptor Date: Mon, 19 Jan 2015 14:33:25 +0100 Message-ID: <1469711.vAe1BPIYVt@kdudka.brq.redhat.com> User-Agent: KMail/4.14.3 (Linux/3.17.8-300.fc21.x86_64; KDE/4.14.3; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 zsh prints a warning if an already closed file descriptor is to be closed. While this is technically correct, the other shells I tried (ksh and bash) do not print any such warning: $ bash -c '(true <&-) <&-' $ ksh -c '(true <&-) <&-' $ zsh -c '(true <&-) <&-' zsh:1: failed to close file descriptor 0: bad file descriptor The warning was introduced by the following commit: http://sourceforge.net/p/zsh/code/ci/45913f43 ... and it causes problems when porting legacy scripts to a newer version of zsh. Is there any way to suppress the warning? If not, how can one achieve compatibility with other shells (including older versions of zsh)? Kamil