From 4f26d1a3f8a9e00c7cc63a2a749c17bd19e4a5a3 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 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/shared/PosixDaemon.cpp b/src/shared/PosixDaemon.cpp index 15eb8f1034c..a8008330202 100644 --- a/src/shared/PosixDaemon.cpp +++ b/src/shared/PosixDaemon.cpp @@ -84,15 +84,9 @@ void startDaemon(uint32_t timeout) exit(EXIT_FAILURE); } - if ((chdir("/")) < 0) - { - exit(EXIT_FAILURE); - } - close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); - } void stopDaemon()