Set and check for a variable at startup.

Fixes a forkbomb experienced on some systems. Closes #1