Patch Detail
Show a patch.
GET /api/patches/1718/?format=api
{ "id": 1718, "url": "https://patchwork.libcamera.org/api/patches/1718/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1718/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190719080556.26785-1-jacopo@jmondi.org>", "date": "2019-07-19T08:05:56", "name": "[libcamera-devel] libcamera: process: Fail loudly on isolate", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "62d575920c2c75e1939bbad6c7f7dc1ab80c386c", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1718/mbox/", "series": [ { "id": 441, "url": "https://patchwork.libcamera.org/api/series/441/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=441", "date": "2019-07-19T08:05:56", "name": "[libcamera-devel] libcamera: process: Fail loudly on isolate", "version": 1, "mbox": "https://patchwork.libcamera.org/series/441/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1718/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1718/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E617860C00\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Jul 2019 10:04:43 +0200 (CEST)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 5E28C24000F;\n\tFri, 19 Jul 2019 08:04:42 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 19 Jul 2019 10:05:56 +0200", "Message-Id": "<20190719080556.26785-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: process: Fail loudly on isolate", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Fri, 19 Jul 2019 08:04:44 -0000" }, "content": "Add an error debug message when disassociating part of a process\nexecution context using unshare fails.\n\nAs this is currently used to isolate a child process which is\nimmediately terminated silently if unshare fails, add a debug printout\nand propagate up the error code to make the failure more visible.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/process.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)\n\n--\n2.21.0", "diff": "diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\nindex 6c41da219f05..ab716a9cd57f 100644\n--- a/src/libcamera/process.cpp\n+++ b/src/libcamera/process.cpp\n@@ -306,7 +306,15 @@ void Process::closeAllFdsExcept(const std::vector<int> &fds)\n\n int Process::isolate()\n {\n-\treturn unshare(CLONE_NEWUSER | CLONE_NEWNET);\n+\tint ret = unshare(CLONE_NEWUSER | CLONE_NEWNET);\n+\tif (ret) {\n+\t\tret = -errno;\n+\t\tLOG(Process, Error) << \"Failed to unshare execution context: \"\n+\t\t\t\t << strerror(-ret);\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n }\n\n /**\n", "prefixes": [ "libcamera-devel" ] }