aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-11-07 11:32:31 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-11-07 11:32:42 +0100
commita733d536adeaf6afed3bb96bbc7f822f49802bd3 (patch)
tree70ee425c0fa5deaceafa26232c512e09fba1e3a1 /utils.c
parent9fc35e7a7e29d9a346865651387a02514080c6b4 (diff)
Added env check `NDPID_STARTED_BY_SYSTEMD` to prevent logging to `stderr` in such a case
* removed `nDPId` shutdown on poll/epoll error * fixed `chmod_chown()` rv check Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index ecd5dbcc5..25f16f81d 100644
--- a/utils.c
+++ b/utils.c
@@ -586,9 +586,12 @@ __attribute__((format(printf, 2, 3))) void logger_early(int is_error, char const
int old_log_to_console = log_to_console;
va_list ap;
- va_start(ap, format);
- vlogger_to(fileno(stderr), is_error, format, &ap);
- va_end(ap);
+ if (getenv("NDPID_STARTED_BY_SYSTEMD") == NULL)
+ {
+ va_start(ap, format);
+ vlogger_to(fileno(stderr), is_error, format, &ap);
+ va_end(ap);
+ }
log_to_console = 0;