environment: make the shutdown flag an atomic variable.