diff options
author | Matthias Fend <matthias.fend@emfend.at> | 2023-02-20 08:43:52 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-03-01 16:46:08 +0100 |
commit | dbe96a2a6b130f7a3ffa1ad037b96cbbd7514956 (patch) | |
tree | b35d7b26c7993edab250bb7f647e43148689ea44 /src | |
parent | 51396ab512b5f454f9acc4bc133827e2b26e0f43 (diff) |
libcamera: Keep using syslog for isolated IPA modules
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 module 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 <matthias.fend@emfend.at>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/process.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |