From c74ef48b4057e8886c78f604ced6c63ffd3ed7da Mon Sep 17 00:00:00 2001 From: "Albert S." Date: Sun, 21 Jul 2024 14:34:55 +0200 Subject: [PATCH] shared: SandboxedProcessor: Return proper exit code for failures --- shared/sandboxedprocessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/sandboxedprocessor.cpp b/shared/sandboxedprocessor.cpp index 7af0121..2213c2d 100644 --- a/shared/sandboxedprocessor.cpp +++ b/shared/sandboxedprocessor.cpp @@ -36,7 +36,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath) if(policy == NULL) { qCritical() << "Could not init exile" << Qt::endl; - exit(EXIT_FAILURE); + exit(PROCESSFAIL); } policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER; @@ -49,7 +49,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath) if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0) { qCritical() << "Failed to add path policies"; - exit(EXIT_FAILURE); + exit(PROCESSFAIL); } } else @@ -60,7 +60,7 @@ void SandboxedProcessor::enableSandbox(QString readablePath) if(ret != 0) { qCritical() << "Failed to establish sandbox: " << ret; - exit(EXIT_FAILURE); + exit(PROCESSFAIL); } exile_free_policy(policy); }