janetsh
janetsh copied to clipboard
Test/ensure semantics of $$ $$_ $? if job is stopped and it was a fg job.
It could be confusing, especially in script mode if a user requests $? and then the job stops. $$ and $$_ may not need any change because they wait for an fd to return EOF.
For example, it may be better to raise an exception so scripts don't fail silently.