spark-class gets the following error when running in posix mode:
It appears to be complaining about the process substitution:
This can be reproduced by first turning on allexport then posix mode:
then run something like spark-shell which calls spark-class.
The simplest fix is probably to always turn off posix mode in spark-class before the while loop.
This was previously reported in SPARK-8417 which closed with cannot reproduce.