bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/4] proc: Don't buffer Mach console output


From: Samuel Thibault
Subject: Re: [PATCH v2 3/4] proc: Don't buffer Mach console output
Date: Mon, 15 May 2023 18:32:42 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Sergey Bugaev, le lun. 15 mai 2023 10:35:59 +0300, a ecrit:
> Normally glibc does not buffer tty output, but a devstream backed by
> the Mach console device cannot be isatty'ed. So we need to ask glibc
> explicitly to not buffer it. This is what the startup and mach-defpager
> do already.
> ---
>  proc/main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/proc/main.c b/proc/main.c
> index 8a2dc9ff..747646ef 100644
> --- a/proc/main.c
> +++ b/proc/main.c
> @@ -132,6 +132,7 @@ open_console (mach_port_t device_master)
>  
>    stdin = mach_open_devstream (cons, "r");
>    stdout = stderr = mach_open_devstream (cons, "w");
> +  setbuf (stdout, NULL);
>  
>    got_console = 1;
>    mach_port_deallocate (mach_task_self (), cons);
> -- 
> 2.40.1
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]