all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] qmeventd: flush after verbose printing
@ 2020-11-24 14:04 Dominik Csapak
  2020-11-25 13:34 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-11-24 14:04 UTC (permalink / raw)
  To: pve-devel

if one would try to use -v in a systemd service, systemd would disable
line buffering for stdout and no output would happen (until the buffer
is full)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 qmeventd/qmeventd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qmeventd/qmeventd.h b/qmeventd/qmeventd.h
index 1921ef3..3dc539c 100644
--- a/qmeventd/qmeventd.h
+++ b/qmeventd/qmeventd.h
@@ -30,7 +30,7 @@
 #define __NR_pidfd_send_signal 424
 #endif
 
-#define VERBOSE_PRINT(...) do { if (verbose) { printf(__VA_ARGS__); } } while (0)
+#define VERBOSE_PRINT(...) do { if (verbose) { printf(__VA_ARGS__); fflush(stdout); } } while (0)
 
 static inline void log_neg(int errval, const char *msg)
 {
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] qmeventd: flush after verbose printing
  2020-11-24 14:04 [pve-devel] [PATCH qemu-server] qmeventd: flush after verbose printing Dominik Csapak
@ 2020-11-25 13:34 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-25 13:34 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 24.11.20 15:04, Dominik Csapak wrote:
> if one would try to use -v in a systemd service, systemd would disable
> line buffering for stdout and no output would happen (until the buffer
> is full)
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  qmeventd/qmeventd.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-25 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 14:04 [pve-devel] [PATCH qemu-server] qmeventd: flush after verbose printing Dominik Csapak
2020-11-25 13:34 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal