Subject: bug#58416: -u should only affect stdout, not stdin

From: Andras Korn <[email-masked]>
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.