zsh-workers
 help / color / mirror / code / Atom feed
* $ERRNO broken
@ 2016-10-14 15:56 Stephane Chazelas
  2016-10-14 16:04 ` [doc] " Stephane Chazelas
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Chazelas @ 2016-10-14 15:56 UTC (permalink / raw)
  To: Zsh hackers list

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
$

Cheers,
Stephane


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

* Re: [doc] $ERRNO broken
  2016-10-14 15:56 $ERRNO broken Stephane Chazelas
@ 2016-10-14 16:04 ` Stephane Chazelas
  2016-10-14 17:00   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Chazelas @ 2016-10-14 16:04 UTC (permalink / raw)
  To: Zsh hackers list

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


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

* Re: [doc] $ERRNO broken
  2016-10-14 16:04 ` [doc] " Stephane Chazelas
@ 2016-10-14 17:00   ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2016-10-14 17:00 UTC (permalink / raw)
  To: Zsh hackers list

On Fri, 14 Oct 2016 17:04:59 +0100
Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> 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.

This is 32377 / f3e7cfe4, which described itself as a "first go", so
there may be more to come.  It touched various variables.

pws


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

end of thread, other threads:[~2016-10-14 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 15:56 $ERRNO broken Stephane Chazelas
2016-10-14 16:04 ` [doc] " Stephane Chazelas
2016-10-14 17:00   ` Peter Stephenson

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