summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/process.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index 6c41da21..ab716a9c 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -306,7 +306,15 @@ void Process::closeAllFdsExcept(const std::vector<int> &fds)
int Process::isolate()
{
- return unshare(CLONE_NEWUSER | CLONE_NEWNET);
+ int ret = unshare(CLONE_NEWUSER | CLONE_NEWNET);
+ if (ret) {
+ ret = -errno;
+ LOG(Process, Error) << "Failed to unshare execution context: "
+ << strerror(-ret);
+ return ret;
+ }
+
+ return 0;
}
/**