diff options
author | Eric Wong <e@80x24.org> | 2021-09-13 20:53:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-13 21:11:14 +0000 |
commit | 62181c1f4fa112e066e01ba5f2cf666b9639adf2 (patch) | |
tree | 4ee856fd536d9e8f447a5d598ba3fa050856bf28 /t/run.perl | |
parent | 530287cca30c9812d36e58e77d72742e5c1aa5f6 (diff) | |
download | public-inbox-62181c1f4fa112e066e01ba5f2cf666b9639adf2.tar.gz |
PIPE_BUF accounts for Linux being 4096 (and presumably other OSes differing), while _POSIX_PIPE_BUF is the minimum 512 value.
Diffstat (limited to 't/run.perl')
-rwxr-xr-x | t/run.perl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -18,7 +18,7 @@ use PublicInbox::Spawn; use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev); use Errno qw(EINTR); use Fcntl qw(:seek); -use POSIX qw(_POSIX_PIPE_BUF WNOHANG); +use POSIX qw(WNOHANG); use File::Temp (); my $jobs = 1; my $repeat = 1; @@ -199,7 +199,7 @@ for (my $i = $repeat; $i != 0; $i--) { pipe(my ($rd, $wr)) or DIE "pipe: $!"; # fill the queue before forking so children can start earlier - my $n = (_POSIX_PIPE_BUF / UINT_SIZE); + my $n = (POSIX::PIPE_BUF / UINT_SIZE); if ($n >= $#todo) { print $wr join('', map { pack('I', $_) } (0..$#todo)) or DIE; undef $wr; |