]> arthur.barton.de Git - bup.git/commit
Handle sysconf results more carefully
authorRob Browning <rlb@defaultvalue.org>
Tue, 14 Jul 2015 00:33:24 +0000 (19:33 -0500)
committerRob Browning <rlb@defaultvalue.org>
Tue, 14 Jul 2015 00:49:59 +0000 (19:49 -0500)
commite6ee5c9bbee41e7a3b1891e252de89571d0ee717
treee0baa4ee55d3517ef8bb89007f827ca29e9526a9
parent74000ce8a63097fdfc3bb2eb18764a841e5164cf
Handle sysconf results more carefully

Sysconf indicates that there's no definite limit by returning -1 and
leaving errno unchanged.  In that case, for SC_ARG_MAX, guess 4096.  For
SC_PAGE_SIZE, die, since various operations currently require a
page_size.

Thanks to Mark J Hewitt for reporting the issue, and to Mark and Nix for
investigating the cause.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c
lib/bup/helpers.py