Garrett D'Amore wrote: > Bob Friesenhahn wrote: > > On Fri, 10 Jul 2009, Roland Mainz wrote: > >>> > >>> Some applications may misbehave or lock-up if the size of the pipe > >>> buffer is changed. > >> > >> Erm... why ? > > > > You have already noticed that the size is hard-coded in Solaris > > applications (by PIPE_BUF) since the dawn of time. Pipes offer > > properties such as atomic reads and writes. PIPE_BUF declares the > > maximum size of an atomic write. Some applications depend on this > > FIFO behavior for message passing. > > > > You should feel happy that Solaris is using 5120 rather than 512 like > > FreeBSD. > > Having an ioctl that offers making this tunable could be used by shells > when constructing pipelines between applications that just use pipes to > redirect stdin/stdout. Such a use should not be sensitive to changes in > pipe size, since the applications generally don't even know (or care) > that their stdio is using a pipe.
Well, the shells usually use |ioctl(I_PEEK, ...)| to "look ahead" in the pipe stream (for example to find the next newline character). > I agree that we should *not* have the pipe(2) system call change the > system default... that would be potentially destructive to many > applications, as you note. Why ? BTW: Is there an |ioctl()| to get the pipe's buffer size for a connection ? Or is that only available as process-wide property via |getrlimit()| ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org