diff --git a/src/compton.c b/src/compton.c index 37e93c2..d8efda1 100644 --- a/src/compton.c +++ b/src/compton.c @@ -4965,7 +4965,6 @@ fork_after(session_t *ps) { printf_errf("(): freopen() failed."); return false; } - success = ostream_reopen(ps, NULL); return success; } @@ -7444,6 +7443,10 @@ session_init(session_t *ps_old, int argc, char **argv) { } } + // Redirect output stream + if (ps->o.fork_after_register || ps->o.logpath) + ostream_reopen(ps, NULL); + write_pid(ps); // Free the old session