* [PATCH] util/log: re-allow switching away from stderr log file
@ 2023-10-04 12:44 Fiona Ebner
2023-10-04 13:17 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2023-10-04 12:44 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee, pbonzini, richard.henderson, groug, qemu-stable
Commit 59bde21374 ("util/log: do not close and reopen log files when
flags are turned off") prevented switching away from stderr on a
subsequent invocation of qemu_set_log_internal(). This prevented
switching away from stderr with the 'logfile' monitor command as well
as an invocation like
> ./qemu-system-x86_64 -trace 'qemu_mutex_lock,file=log'
from opening the specified log file.
Fixes: 59bde21374 ("util/log: do not close and reopen log files when flags are turned off")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
util/log.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/log.c b/util/log.c
index def88a9402..d36c98da0b 100644
--- a/util/log.c
+++ b/util/log.c
@@ -298,6 +298,8 @@ static bool qemu_set_log_internal(const char *filename, bool changed_name,
r->fd = logfile;
qatomic_rcu_set(&global_file, NULL);
call_rcu(r, rcu_close_file, rcu);
+ }
+ if (changed_name) {
logfile = NULL;
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] util/log: re-allow switching away from stderr log file
2023-10-04 12:44 [PATCH] util/log: re-allow switching away from stderr log file Fiona Ebner
@ 2023-10-04 13:17 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2023-10-04 13:17 UTC (permalink / raw)
To: Fiona Ebner
Cc: qemu-devel, alex.bennee, pbonzini, richard.henderson, groug,
qemu-stable
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-04 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 12:44 [PATCH] util/log: re-allow switching away from stderr log file Fiona Ebner
2023-10-04 13:17 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).