summaryrefslogtreecommitdiffstats
path: root/exec.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-04-15 21:55:27 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-04-15 21:55:27 -0400
commit9ffb3ebdaa5ad4c5cdcbd7c8682521de995ea62c (patch)
tree6eba7402c3bb0162e2ba295f76ba2c7c84cd33dc /exec.h
parenta1f764c5e5041d80300182b41c346d22292068b2 (diff)
downloadbfs-9ffb3ebdaa5ad4c5cdcbd7c8682521de995ea62c.tar.xz
exec: Interpret ARG_MAX corretly.
Thanks to https://www.in-ulm.de/~mascheck/various/argmax/
Diffstat (limited to 'exec.h')
-rw-r--r--exec.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/exec.h b/exec.h
index ab548af..498013a 100644
--- a/exec.h
+++ b/exec.h
@@ -46,7 +46,12 @@ struct bfs_exec {
char **argv;
/** Number of command line arguments. */
size_t argc;
- /** Maximum argc before E2BIG. */
+ /** Capacity of argv. */
+ size_t argv_cap;
+
+ /** Current size of all arguments. */
+ size_t arg_size;
+ /** Maximum arg_size before E2BIG. */
size_t arg_max;
/** A file descriptor for the working directory, for BFS_EXEC_CHDIR. */