zsh-users
 help / color / mirror / code / Atom feed
* warning about closing an already closed file descriptor
@ 2015-01-19 13:33 Kamil Dudka
  2015-01-19 14:59 ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Kamil Dudka @ 2015-01-19 13:33 UTC (permalink / raw)
  To: Zsh Users

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-20 11:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-19 13:33 warning about closing an already closed file descriptor Kamil Dudka
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

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).