From: "J.D. Laub" <jdl@clinicom.com>
To: zsh-workers@math.gatech.edu
Subject: bug with "r" command
Date: Fri, 30 Aug 1996 18:30:36 -0600 (MDT) [thread overview]
Message-ID: <199608310030.SAA37469@clinicom.com> (raw)
Using the "r" command (sometimes?) sets $? to 0 when it should not.
This wreaks havoc with scripts that
1) test $?, and
2) that happen to have been run with "r".
Simple example:
Script started on Fri Aug 30 17:41:16 1996
chimay% ./zsh -f
chimay% print $ZSH_VERSION
3.0.0
chimay% fg
fg: no current job
chimay% print $?
1
chimay% fg
fg: no current job
chimay% r pri
print $?
0
chimay% exit
chimay% exit
script done on Fri Aug 30 17:42:00 1996
Probably naive observation: the culprit looks like exec.c:1663
getting executed twice: the first changes "r pri" to "print $?", and
the second actually runs the print. The problem is that the first
execution sets lastval to 0, and it doesn't get reset back to 1 before
the second execution.
--
J.D. Laub (Laubster) HBOC/CliniCom|"I think you're very, very, very, very, very,
jdl@clinicom.com Boulder,CO |very, very, very, very, ..." - Flying Lizards
reply other threads:[~1996-08-31 5:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=199608310030.SAA37469@clinicom.com \
--to=jdl@clinicom.com \
--cc=zsh-workers@math.gatech.edu \
/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).