From 9ffb3ebdaa5ad4c5cdcbd7c8682521de995ea62c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 15 Apr 2017 21:55:27 -0400 Subject: exec: Interpret ARG_MAX corretly. Thanks to https://www.in-ulm.de/~mascheck/various/argmax/ --- exec.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'exec.h') 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. */ -- cgit v1.2.3