On Wed, Jul 29, 2026 at 02:41:56PM +0200, Alyssa Ross wrote:
> I'd like to write an infinite loop in an execline script, that keeps
> going regardless of the result of the contents of the loop.
>
> Of course, I could do loopwhilex foreground { ... }.
> I'd have expected the simpler loopwhile -x "" to work, though.
> It seems like the empty comma-separated list of exit codes is not
> allowed. Maybe it could be?
In theory, you could do something funny like `loopwhilex -x 30000 ...`,
although this might turn into a problem some day on systems that
actually support more than 256 values for an exit code.
On that note, hm, is this supposed to happen?
[roam_at_straylight ~]$ execlineb -c 'loopwhilex -x 300000 echo hi'
hi
[roam_at_straylight ~]$
...I mean, I kind of understand *what* is happening here (loopwhilex runs
the program, then checks for the exit code condition, and then
figures out that something is wrong), but shouldn't 3000000 be
rejected as an invalid argument before even executing the program once?
G'luck,
Peter
--
Peter Pentchev roam_at_ringlet.net roam_at_debian.org peter_at_morpheusly.com
PGP key: https://www.ringlet.net/roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
Received on Wed Jul 29 2026 - 15:04:10 CEST