GNU bug report logs - #58416
-u should only affect stdout, not stdin

Previous Next

Package: sed;

Reported by: Andras Korn <korn-gnu.org <at> elan.rulez.org>

Date: Mon, 10 Oct 2022 16:45:01 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andras Korn <korn-gnu.org <at> elan.rulez.org>
To: <bug-sed <at> gnu.org>
Subject: -u should only affect stdout, not stdin
Date: Mon, 10 Oct 2022 17:27:20 +0200
Hi,

I just straced a running sed(1) instance (4.8), and was amazed to see it read its input character by character.

I then remembered that I called it with '-u' because its output was being read by a program that needed it ASAP.

I can't see any benefit to reading stdin by the character, but am prepared to believe a use-case exists. However, I submit that not all use-cases that require unbuffered (or line-buffered) output also automatically need inefficient reading of the input.

Maybe add a new switch for the input part?

Thanks and best regards,

AndrĂ¡s

-- 
                    Klein bottle for rent; enquire within.




This bug report was last modified 2 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.