--- /dev/null +++ b/package/system/procd/patches/001-fix-cwd.patch @@ -0,0 +1,16 @@ +--- a/state.c ++++ b/state.c +@@ -48,11 +48,11 @@ + if (chdir("/dev") || + !freopen(tty, "r", stdin) || + !freopen(tty, "w", stdout) || +- !freopen(tty, "w", stderr) || +- chdir("/")) ++ !freopen(tty, "w", stderr)) + ERROR("failed to set stdio: %m\n"); + else + fcntl(STDERR_FILENO, F_SETFL, fcntl(STDERR_FILENO, F_GETFL) | O_NONBLOCK); ++ chdir("/"); + } + + static void set_console(void)