Re: Proposed new feature for bash: unbuffered pipes

2020-04-24 Thread Chet Ramey
On 4/22/20 9:31 PM, Dale R. Worley wrote: > The crux of the problem, IMHO, is to look at it from the right angle: I'm not going to add this to bash. It's a bad idea to add a feature that will perpetually require a user to patch glibc (!), and that will never be added to any mainline glibc

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Daniel Colascione
On April 22, 2020 6:32:07 PM wor...@alum.mit.edu (Dale R. Worley) wrote: The crux of the problem, IMHO, is to look at it from the right angle: Occasionally, the user desires that I/O through certain pipes should be unbuffered, that is, the stdio stream(s) that write into the pipe should be

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Daniel Colascione
On 4/23/20 4:39 PM, Dale R. Worley wrote: Andreas Schwab writes: See stdbuf(1). The limitation(s) of stdbuf are: It can only be applied to the standard I/O streams. It doesn't affect statically-linked executables. It only applies to a single executable, so if the command is a shell

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Dale R. Worley
Andreas Schwab writes: > See stdbuf(1). The limitation(s) of stdbuf are: It can only be applied to the standard I/O streams. It doesn't affect statically-linked executables. It only applies to a single executable, so if the command is a shell function or script, or creates subprocesses, it

Re: Proposed new feature for bash: unbuffered pipes

2020-04-23 Thread Andreas Schwab
See stdbuf(1). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: Proposed new feature for bash: unbuffered pipes

2020-04-22 Thread Dale R. Worley
The crux of the problem, IMHO, is to look at it from the right angle: Occasionally, the user desires that I/O through certain pipes should be unbuffered, that is, the stdio stream(s) that write into the pipe should be unbuffered, rather than the default block-buffered. These are situations where

Re: Proposed new feature for bash: unbuffered pipes, part 1: overview

2020-04-22 Thread Dale R. Worley
Greg Wooledge writes: > On Tue, Apr 21, 2020 at 08:38:41PM -0400, Dale R. Worley wrote: >> The "unbuffered pipe" symbol ">|>" causes Bash to set in the >> environment of the "grep" process a variable "STDOUT_UNBUFFERED" with >> a value that contains the dev and ino values for the pipe which the

Re: Proposed new feature for bash: unbuffered pipes, part 1: overview

2020-04-22 Thread Greg Wooledge
On Tue, Apr 21, 2020 at 08:38:41PM -0400, Dale R. Worley wrote: > The "unbuffered pipe" symbol ">|>" causes Bash to set in the > environment of the "grep" process a variable "STDOUT_UNBUFFERED" with > a value that contains the dev and ino values for the pipe which the > "grep" process sees as fd