diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-02-11 13:13:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-12 11:01:11 -0800 |
commit | a983e6ac58094a3b2466ad3be13049ce213f9fc3 (patch) | |
tree | 4b63b2088ba8dfacdda37abea41621e26bdf3c37 /git-quiltimport.sh | |
parent | xread, xwrite: limit size of IO to 8MB (diff) | |
download | tgif-a983e6ac58094a3b2466ad3be13049ce213f9fc3.tar.xz |
xread/xwrite: clip MAX_IO_SIZE to SSIZE_MAX
Since 0b6806b9 (xread, xwrite: limit size of IO to 8MB, 2013-08-20),
we chomp our calls to read(2) and write(2) into chunks of
MAX_IO_SIZE bytes (8 MiB), because a large IO results in a bad
latency when the program needs to be killed. This also brought our
IO below SSIZE_MAX, which is a limit POSIX allows read(2) and
write(2) to fail when the IO size exceeds it, for OS X, where a
problem was originally reported.
However, there are other systems that define SSIZE_MAX smaller than
our default, and feeding 8 MiB to underlying read(2)/write(2) would
fail. Make sure we clip our calls to the lower limit as well.
Reported-by: Joachim Schmitz <jojo@schmitz-digital.de>
Helped-by: Torsten Bögershausen <tboegi@web.de>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-quiltimport.sh')
0 files changed, 0 insertions, 0 deletions