close with exit code

Allow users to close their app with a specific exit code