Re: while do done

2021-07-02 Thread Reuben ua Bríġ
> Date: Fri, 2 Jul 2021 11:17:20 -0600 > From: "Todd C. Miller" > Actually, the following _can_ be interrupted: > > while :; do done > > while :; do :; done oops. its been so long i completely forgot. > The only problem is: > > while do done > > which may not actually be

Re: while do done

2021-07-02 Thread Todd C . Miller
On Fri, 02 Jul 2021 14:16:20 +1000, Reuben ua =?UTF-8?Q?Br=C3=AD=C4=A1?= wrote: > you CAN interrupt > > while do sleep 0; done > > there is no need for exit, and it doesnt fix > > while do done > > or > > while :; do :; done > > if your shell needs something to not do.

Re: while do done

2021-07-02 Thread Reuben ua Bríġ
> On Mon, 28 Jun 2021 22:20:15 +1000 > Reuben ua Bríġ wrote: > > you cant interrupt sh in > > while do done > > not that it matters. > Date: Fri, 2 Jul 2021 09:07:41 +1000 > From: Stuart Longland > oninterrupt() { > echo "I was interrupted!" > exit 0 > } > > trap

Re: while do done

2021-07-02 Thread Stuart Longland
On Fri, 2 Jul 2021 14:16:20 +1000 Reuben ua Bríġ wrote: > > while true; do > > # Do something > > sleep 10 > > done > > you CAN interrupt > > while do sleep 0; done > > there is no need for exit, and it doesnt fix > > while do done Your bug report was vague and

Re: while do done

2021-07-01 Thread Stuart Longland
On Mon, 28 Jun 2021 22:20:15 +1000 Reuben ua Bríġ wrote: > you cant interrupt sh in > > while do done > > not that it matters. > vk4msl-bne$ cat test.sh