dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	DASH shell mailing list <dash@vger.kernel.org>
Subject: Fwd: Busybox ash buffering-related issue in error handling
Date: Fri, 30 Oct 2020 13:19:32 +0100	[thread overview]
Message-ID: <CAK1hOcMQP9ZAeF_Vh-Ta_sPeeXPS9_6wsN8V8uS=gu-Fcx8yMQ@mail.gmail.com> (raw)
In-Reply-To: <CANSNw=_7LH8NtM558HOn9Se0ZgMjxEus5=6jktkY3HrrBAH71A@mail.gmail.com>

This bug happens in dash too
(I assume it's "pungets" counter not being reset on errors):

---------- Forwarded message ---------
From: Sergey Zakharchenko <szakharchenko@digital-loggers.com>
Date: Thu, Oct 29, 2020 at 8:00 AM
Subject: Busybox ash buffering-related issue in error handling
To: Denys Vlasenko <vda.linux@googlemail.com>

It appears that, in the interactive shell, the
input buffer has 1 last character remaining after some syntax errors
are handled. The next command is interpreted with that character
prepended, e.g.:

$ ;l
ash: syntax error: unexpected ";"
$ s
[ls output]

Expected output for reference:

$ ;l
sh: 1: Syntax error: ";" unexpected
$ s
sh: 1: s: not found

Similarly, an input of ;# makes the next command be treated as a
comment and not executed.

I'm observing this on x86-64 112453acf24520b4655f9f36da41d8ac591b1a60,
with default options, but it's the same on earlier versions with
different options and a different platform so it's not new.

Best regards,

--
Sergey Zakharchenko
Digital Loggers, Inc.

           reply	other threads:[~2020-10-30 12:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CANSNw=_7LH8NtM558HOn9Se0ZgMjxEus5=6jktkY3HrrBAH71A@mail.gmail.com>]

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='CAK1hOcMQP9ZAeF_Vh-Ta_sPeeXPS9_6wsN8V8uS=gu-Fcx8yMQ@mail.gmail.com' \
    --to=vda.linux@googlemail.com \
    --cc=dash@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    /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.
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).