[RndTbl] Shell exec(2) help?

Trevor Cordes trevor at tecnopolis.ca
Sat Jul 4 00:35:19 CDT 2020

(Late to the party.)

You could use bash's eval in a while.  Download your new code into a
shell var (or a file you then open/read or slurp), like (psuedocode):

while (true) {
  newcode=`curl mynewcode`
  eval $newcode

That has no forks and allows you to update the code inside the while.

Other than that, I'm not sure why the shell is doing such weirdness.
The infinite recursion is a bit of a surprise.  Gilbert's supposition
is probably on the right track.

If you have perl, it gives you finer-grained (C-ish level) control over
exec-ish calls and might allow you to work around this problem.  I find
the Run3 module particularly useful.  However, perl is probably
overkill and it's not your favorite...

More information about the Roundtable mailing list