Dave Mitchell <davem@iabyn.com> writes: > On Mon, Oct 06, 2014 at 09:38:11PM +0200, Ævar Arnfjörð Bjarmason wrote: > Ah, sorry; I completely failed to spot the obvious in your OP. > >> -$buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully >> +$buf = "a" x 1_000_000_000 . "\n"; # bigger than any pipe buffer hopefully > > Interesting. Are you able to find a smaller value that still blocks? > I should imagine a 1Gb string might choke small systems. The (Linux-specific) F_GETPIPE_SZ fcntl returns the size of the pipe buffer, and the fs.pipe-max-size sysctl (or the /proc/sys/fs/pipe-max-size file) has the max size an unprivileged process can set it to. They are 64KiB and 1MiB respectively on this x86_64 Linux 3.2 box (Ubuntu 12.04). -- "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck MathisenThread Previous