zsh-users
 help / color / mirror / code / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: warning about closing an already closed file descriptor
Date: Mon, 19 Jan 2015 14:33:25 +0100	[thread overview]
Message-ID: <1469711.vAe1BPIYVt@kdudka.brq.redhat.com> (raw)

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


             reply	other threads:[~2015-01-19 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 13:33 Kamil Dudka [this message]
2015-01-19 14:59 ` Peter Stephenson
2015-01-19 17:28   ` Peter Stephenson
2015-01-20  9:36     ` Kamil Dudka
2015-01-20 11:02     ` Roman Neuhauser
2015-01-20 11:39       ` Peter Stephenson
2015-01-20 11:43         ` Roman Neuhauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469711.vAe1BPIYVt@kdudka.brq.redhat.com \
    --to=kdudka@redhat.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).