Re: [PATCH] Fix ed shell command when stdout isn't line-buffered

2022-01-22 Thread Theo de Raadt
Todd C. Miller wrote: > On Sat, 22 Jan 2022 14:24:17 +0100, =?UTF-8?Q?S=C3=B6ren?= Tempel wrote: > > > The patch below fixes this issue by flushing all open output streams > > before executing the command using system(3). Alternatively, it may also > > be sufficient to only flush stdout and

Re: [PATCH] Fix ed shell command when stdout isn't line-buffered

2022-01-22 Thread Todd C . Miller
On Sat, 22 Jan 2022 14:24:17 +0100, =?UTF-8?Q?S=C3=B6ren?= Tempel wrote: > The patch below fixes this issue by flushing all open output streams > before executing the command using system(3). Alternatively, it may also > be sufficient to only flush stdout and (maybe) stderr. Just flushing

[PATCH] Fix ed shell command when stdout isn't line-buffered

2022-01-22 Thread Sören Tempel
Hello, The ed shell escape command currently behaves incorrectly if standard output isn't line-buffered. As an example, consider the following ed(1) invocations: $ cat /tmp/ed-cmd !echo foo !! $ ed < /tmp/ed-cmd foo ! echo foo foo