diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-11-07 11:32:31 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-11-07 11:32:42 +0100 |
commit | a733d536adeaf6afed3bb96bbc7f822f49802bd3 (patch) | |
tree | 70ee425c0fa5deaceafa26232c512e09fba1e3a1 /utils.c | |
parent | 9fc35e7a7e29d9a346865651387a02514080c6b4 (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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |