[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/MUSL PATCH 2/3] Add patch to fflush after printing on stdout


  • To: minios-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Gaulthier Gain <Gaulthier.Gain@xxxxxxxxx>
  • Date: Wed, 26 Feb 2020 10:48:14 +0100
  • Delivery-date: Wed, 26 Feb 2020 09:48:22 +0000
  • Dkim-filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be E48B3201870E
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Please, ignore this patch. We found a better way to do it. We will send a new 
patch quite soon.

Gaulthier

> On 25 Feb 2020, at 13:49, gaulthier.gain@xxxxxxxxx wrote:
> 
> From: gaulthier gain <gaulthier.gain@xxxxxxxxx>
> 
> This patch fixes the issue where printing on stdout does
> nothing since stdout was not flushed. We found that all
> print-related functions call "puts" as an internal function
> to print output on the console. Therefore, we call fflush
> directly after the "puts" call.
> 
> Signed-off-by: gaulthier gain <gaulthier.gain@xxxxxxxxx>
> ---
> patches/0009-fflush-after-puts.patch | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 patches/0009-fflush-after-puts.patch
> 
> diff --git a/patches/0009-fflush-after-puts.patch 
> b/patches/0009-fflush-after-puts.patch
> new file mode 100644
> index 0000000..7f1e8dc
> --- /dev/null
> +++ b/patches/0009-fflush-after-puts.patch
> @@ -0,0 +1,25 @@
> +From aed4243e93e9327357f8429af3bf380739968e42 Mon Sep 17 00:00:00 2001
> +From: gaulthier gain <gaulthier.gain@xxxxxxxxx>
> +Date: Tue, 25 Feb 2020 11:55:58 +0000
> +Subject: [PATCH] Add fflush after puts in order to flush stdout
> +
> +Signed-off-by: Gaulthier Gain <gaulthier.gain@xxxxxxxxx>
> +---
> + src/stdio/puts.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/stdio/puts.c b/src/stdio/puts.c
> +index 5a38a49..d19e5b6 100644
> +--- a/src/stdio/puts.c
> ++++ b/src/stdio/puts.c
> +@@ -5,6 +5,7 @@ int puts(const char *s)
> +     int r;
> +     FLOCK(stdout);
> +     r = -(fputs(s, stdout) < 0 || putc_unlocked('\n', stdout) < 0);
> ++    fflush(stdout);
> +     FUNLOCK(stdout);
> +     return r;
> + }
> +--
> +2.17.1
> +
> --
> 2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.