pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: abysmal check-portability speed



    Date:        Wed, 25 Sep 2024 16:50:25 +0100
    From:        Jonathan Perkin <jperkin%mnx.io@localhost>
    Message-ID:  <ZvQxQcjFItiuzBF9%mnx.io@localhost>

  | While developing this I realised that the "read -n" patch is harmful, at 
  | least with certain shells:
  |
  |    $ printf "foo\nbar\n" | bash -c 'read -n 128 foo; echo $foo'
  |    foo

If/when we add -n, it will certainly act like that, and not:

  |    $ printf "foo\nbar\n" | mksh -c 'read -n 128 foo; echo $foo'
  |    foo bar

That looks like a bug to me, though the mksh doc for read -n is
fairly pathetic (enough for someone to use it the way the
developer intended it to be used, useless as an actual definition
of what happens.)   ksh93 doesn't do that, and it's specification
for read -n is quite similar to mksh's.

kre



Home | Main Index | Thread Index | Old Index