dev: consolidate exit value management
dev: consolidate exit value management

Former-commit-id: 514130d1e08b81e8fa5c1c76d094b5183d602e54
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine