From: Bart Schaefer <schaefer@brasslantern.com>
To: dominik.vogt@gmx.de, Zsh Users <zsh-users@zsh.org>
Subject: Re: kill % fails?
Date: Sun, 28 Nov 2021 12:10:38 -0800 [thread overview]
Message-ID: <CAH+w=7Yr6BTmfqJ0HPm9yYoq78E7q6n1ZFfHhaTqwrf6B+kA8Q@mail.gmail.com> (raw)
In-Reply-To: <YaNQvoEmztAm7pqb@gmx.de>
On Sun, Nov 28, 2021 at 1:50 AM Dominik Vogt <dominik.vogt@gmx.de> wrote:
>
> > Run with xtrace enabled?
>
> It prints the whole block inside the loop
Hmm. I used
% for i in {1000..1}; do /bin/sleep $i & sleep 0.01; kill %; done
and I get as the last two iterations
+Src/zsh:12> i=5
[997] 64582
+Src/zsh:12> /bin/sleep 5
+Src/zsh:12> sleep 0.01
+Src/zsh:12> kill %
+Src/zsh:12> i=4
[998] 64584
zsh: job table full
+Src/zsh:12> /bin/sleep 4
So that looks to me as though the background "/bin/sleep 4" fills the
table and the foreground sleep fails and kills the loop. The loop is
%1 and the first background job is %2 ...
prev parent reply other threads:[~2021-11-28 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 18:20 Dominik Vogt
2021-11-27 20:28 ` Bart Schaefer
2021-11-28 1:31 ` Dominik Vogt
2021-11-28 2:15 ` Bart Schaefer
2021-11-28 9:49 ` Dominik Vogt
2021-11-28 20:10 ` Bart Schaefer [this message]
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='CAH+w=7Yr6BTmfqJ0HPm9yYoq78E7q6n1ZFfHhaTqwrf6B+kA8Q@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=dominik.vogt@gmx.de \
--cc=zsh-users@zsh.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.
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).