From 2c4560bb641d35dad443e0286bb4edc58bd5c057 Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Sat, 6 Apr 2024 16:32:12 +0100 Subject: [PATCH] [linux][daemon] don't change dirs -> don't break relative paths --- src/shared/PosixDaemon.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/shared/PosixDaemon.cpp b/src/shared/PosixDaemon.cpp index 33806a981bc3..5015c3112bbf 100644 --- a/src/shared/PosixDaemon.cpp +++ b/src/shared/PosixDaemon.cpp @@ -78,11 +78,6 @@ void startDaemon(uint32_t timeout) exit(EXIT_FAILURE); } - if ((chdir("/")) < 0) - { - exit(EXIT_FAILURE); - } - if (!freopen("/dev/null", "rt", stdin)) exit(EXIT_FAILURE); if (!freopen("/dev/null", "wt", stdout))