zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [doc] $ERRNO broken
Date: Fri, 14 Oct 2016 17:04:59 +0100	[thread overview]
Message-ID: <20161014160459.GA17477@chaz.gmail.com> (raw)
In-Reply-To: <20161014155603.GA17198@chaz.gmail.com>

2016-10-14 16:56:03 +0100, Stephane Chazelas:
> Probably unrelated to the $errnos issue raised recently. It
> looks like $ERRNO no longer works, at least on Debian Linux
> unstable amd64 with today's git code built with gcc 6.1 or gcc
> 4.4 or the zsh-5.2-5 Debian package.
> 
> Same on ubuntu 16.04 (5.1.1). It was fine in Ubuntu 14.04
> (5.0.2).
> 
> $ zsh -c '/; echo $ERRNO'
> zsh:1: permission denied: /
> 
> $ zsh -c 'typeset -p ERRNO
> $
[...]

Actually, it's fine when you *set* it beforehand, and you would
generally want to set it beforehand as in:

zsh -c 'ERRNO=0; /; echo $ERRNO'

or otherwise you wouldn't know what system call the $ERRNO you'd
get is from.

So it's just a documentation issue: the doc should say that
ERRNO should be set (declaring it is not enough) before use.

-- 
Stephane


  reply	other threads:[~2016-10-14 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 15:56 Stephane Chazelas
2016-10-14 16:04 ` Stephane Chazelas [this message]
2016-10-14 17:00   ` [doc] " Peter Stephenson

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=20161014160459.GA17477@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=zsh-workers@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).