]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/helpers.py
Handle sysconf results more carefully
[bup.git] / lib / bup / helpers.py
index a9142c64581b1f8e6314fe89fcd8658bfae7e184..4cbd2dc3c36f21dcc1e58db073381035b9af609b 100644 (file)
@@ -10,7 +10,11 @@ import hashlib, heapq, math, operator, time, grp, tempfile
 from bup import _helpers
 
 sc_page_size = os.sysconf('SC_PAGE_SIZE')
+assert(sc_page_size > 0)
+
 sc_arg_max = os.sysconf('SC_ARG_MAX')
+if sc_arg_max == -1:
+    sc_arg_max = 4096
 
 # This function should really be in helpers, not in bup.options.  But we
 # want options.py to be standalone so people can include it in other projects.