Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kill % fails?
- X-seq: zsh-users 27381
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: dominik.vogt@xxxxxx, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: kill % fails?
- Date: Sun, 28 Nov 2021 12:10:38 -0800
- Archived-at: <https://zsh.org/users/27381>
- In-reply-to: <YaNQvoEmztAm7pqb@gmx.de>
- List-id: <zsh-users.zsh.org>
- References: <YaElhducf14tgEIU@gmx.de> <CAH+w=7YP-w4-9VDhTajLjXF8pot6xFuSLQzj4mKcV3pd0QfdMQ@mail.gmail.com> <YaLcDXizEedUq5Pr@gmx.de> <CAH+w=7Yc_BXB+kUV=CmWOXY1H3YaK9JpRPOzX8jMJbpnO_WtOA@mail.gmail.com> <YaNQvoEmztAm7pqb@gmx.de>
On Sun, Nov 28, 2021 at 1:50 AM Dominik Vogt <dominik.vogt@xxxxxx> 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 ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author