9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Michael Forney <mforney@mforney.org>
To: 9front@9front.org
Subject: Re: [9front] [PATCH] g: use xargs instead of finding complete file list before greping
Date: Sat, 1 Jan 2022 18:34:25 -0800	[thread overview]
Message-ID: <CAGw6cBv9MH7k-j6LupYiRWwcoDFhLr8RGO2jtCgW2K6QWqQQqg@mail.gmail.com> (raw)
In-Reply-To: <ada45c6d-f0d1-b54b-1924-f0c0288cd45b@gmail.com>

On 2022-01-01, 有澤 健治 <karisawa@gmail.com> wrote:
> Experiment in my server is
>
> hebe% a=`{seq 1 4000}
> hebe% echo $a
> 1 2 3 4 [snip] 3997 3998 3999 4000
> hebe%
>
> hebe% ls -l /sys/src/cmd/rc/io.c
> --rw-rw-r-- M 98029 sys sys 3757 Oct  5  2019 /sys/src/cmd/rc/io.c
> hebe%

Looks like you're using an rc from before the recent refactoring on
2021-12-31 (commit b90036a0, rc: fix everything).

Before the refactor, the write errors to /env/a were silently ignored.
The rc process that initially set the `a` variable *does* keep track
of the entire list, it is only when it goes to update /env/a that it
gets truncated.

You can try:

a=`{seq 1 4000}
rc -c 'echo $#a'

This should show that the list is truncated in both versions of rc.
It's just that the new version writes out the message 'Write error'
when this happens.

  parent reply	other threads:[~2022-01-02  2:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 10:26 Michael Forney
2022-01-02  1:13 ` 有澤 健治
2022-01-02  1:20   ` ori
2022-01-02  4:56     ` 有澤 健治
2022-01-02  2:34   ` Michael Forney [this message]
2022-01-02  1:28 ` 有澤 健治
2022-01-05  0:05 ` igor
2022-01-05  3:05   ` Michael Forney
2022-01-06  1:35     ` ori
2022-01-06 10:47       ` igor

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=CAGw6cBv9MH7k-j6LupYiRWwcoDFhLr8RGO2jtCgW2K6QWqQQqg@mail.gmail.com \
    --to=mforney@mforney.org \
    --cc=9front@9front.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.
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).