Description: Flush the standard output stream after logging a line
 Make it possible for a parent process to read log lines as they come.
Forwarded: not-needed
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2023-01-05

--- a/unixserver.c
+++ b/unixserver.c
@@ -67,21 +67,27 @@
 
 void log_status(void)
 {
-  if(opt_verbose)
+  if(opt_verbose) {
     printf("unixserver: status: %d/%d\n", forked, opt_connections);
+    fflush(stdout);
+  }
 }
 
 void log_child_exit(pid_t pid, int status)
 {
-  if(opt_verbose)
+  if(opt_verbose) {
     printf("unixserver: end %d status %d\n", pid, status);
+    fflush(stdout);
+  }
   log_status();
 }
 
 void log_child_start(pid_t pid)
 {
-  if(opt_verbose)
+  if(opt_verbose) {
     printf("unixserver: pid %d\n", pid);
+    fflush(stdout);
+  }
 }
 
 void die(const char* msg)
