From patchwork Mon Feb 20 07:43:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fend X-Patchwork-Id: 18288 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2A7FCBE080 for ; Mon, 20 Feb 2023 07:44:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8001262605; Mon, 20 Feb 2023 08:44:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1676879040; bh=f45dz8v9MynZz8+VRJvUOnyv645czI1HEYmLCjNTbos=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tMe/xLmgrPiEQcowAwbmyfdJVXD/X+UFfT91YI0Od1N9mUblaK3LcRw0PC5TFt1AD t7kNkzimozfm90O6il7RaouwAv/2T5b2WXxW86vcZklctLEFtywXitZyqbulNT5XV3 LMy+NMSQOZi9sIHGwndc3FBaahrgk5JMSaf+RRS7paWp5zr4olG/++6SvwWMgjJqjm g0de0oPKdLOmMCN/7iedlJLQ4apm3391f/pQj1PrmSTlDWDiVeArNrR7YQ2NrC8JIp cG9BOLBGOgnc0lMHXBZ4BdaHk2j3hBJV7bbzEXZ/i+8E79WlzRe6j5Dv4NfUZgB5fA tXooRr32ikthA== Received: from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CA68761EE3 for ; Mon, 20 Feb 2023 08:43:58 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=emfend.at header.i=@emfend.at header.b="EfbLXxbg"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RoieJowT7tMojEgNKe3onMHeu1m+OKtKPMjEFBH77/g=; b=EfbLXxbgplWYzeBdzj6FFyjs08 JCLoREQC+FM/f8gNi7P238jkpgY/863RLyMMHZDjErX6/xkvi5UTDHcsEvh78yUs3lOUe+9Nhqn6y lt3U0bNLfthzPDNkEsz2XRh4gib/uX568zIN+IuxsYkVwe3sU66O9MS0ub7w2i6tQgno=; Received: from 194-208-208-245.tele.net ([194.208.208.245]:58851 helo=localhost.localdomain) by lx20.hoststar.hosting with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pU0q5-0023hs-OI for libcamera-devel@lists.libcamera.org; Mon, 20 Feb 2023 08:43:58 +0100 To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Feb 2023 08:43:52 +0100 Message-Id: <20230220074352.1221623-1-matthias.fend@emfend.at> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Score: X-Spam-Bar: X-Spam-Report: Subject: [libcamera-devel] [PATCH] libcamera: keep using syslog logging target also for isolated IPA modules X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Fend via libcamera-devel From: Matthias Fend Reply-To: Matthias Fend Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently it is not possible to display debug output from an isolated IPA module. The standard descriptors are all closed and any specified log file is explicitly deactivated for the IPA module. Since libcamera and the isolated IPA modul are separate processes, they cannot write to the same file. However, if syslog is used, then this would be possible. If syslog is specified as a log file, then this is left as it is for the isolated IPA module. Signed-off-by: Matthias Fend Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi --- src/libcamera/process.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp index 0e6b4e1d..86a382fb 100644 --- a/src/libcamera/process.cpp +++ b/src/libcamera/process.cpp @@ -263,7 +263,9 @@ int Process::start(const std::string &path, closeAllFdsExcept(fds); - unsetenv("LIBCAMERA_LOG_FILE"); + const char *file = utils::secure_getenv("LIBCAMERA_LOG_FILE"); + if (file && strcmp(file, "syslog")) + unsetenv("LIBCAMERA_LOG_FILE"); const char **argv = new const char *[args.size() + 2]; unsigned int len = args.size();