Index: tests/configs/.expect/parsebools.txt
===================================================================
--- tests/configs/.expect/parsebools.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/configs/.expect/parsebools.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,93 @@
+no arg:
+yes/no     :false
+Y/N        :false
+y/n        :false
+true/false :false
+set true   :false
+set false  :true
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+all true/set arg:
+yes/no     :true
+Y/N        :true
+y/n        :true
+true/false :true
+set true   :true
+set false  :false
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+all false/unset arg:
+yes/no     :false
+Y/N        :false
+y/n        :false
+true/false :false
+set true   :false
+set false  :true
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+gibberish arg 1:
+Argument 'true' for option y could not be parsed
+
+Usage:
+  parsebools [OPTIONS]...
+testing bool parameters
+  -e, --yesno       test yes/no
+  -y, --YN          test yes/no
+  -n, --yn          test yes/no
+  -t, --truefalse   test true/false
+  -s, --settrue     test set true
+  -u, --setfalse    test set false
+  -h, --help        print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+gibberish arg 2:
+Argument 'yes' for option t could not be parsed
+
+Usage:
+  parsebools [OPTIONS]...
+testing bool parameters
+  -e, --yesno       test yes/no
+  -y, --YN          test yes/no
+  -n, --yn          test yes/no
+  -t, --truefalse   test true/false
+  -s, --settrue     test set true
+  -u, --setfalse    test set false
+  -h, --help        print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+gibberish arg 3:
+parsebools: invalid option -- '='
+Usage:
+  parsebools [OPTIONS]...
+testing bool parameters
+  -e, --yesno       test yes/no
+  -y, --YN          test yes/no
+  -n, --yn          test yes/no
+  -t, --truefalse   test true/false
+  -s, --settrue     test set true
+  -u, --setfalse    test set false
+  -h, --help        print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+gibberish arg 4:
+parsebools: invalid option -- '='
+Usage:
+  parsebools [OPTIONS]...
+testing bool parameters
+  -e, --yesno       test yes/no
+  -y, --YN          test yes/no
+  -n, --yn          test yes/no
+  -t, --truefalse   test true/false
+  -s, --settrue     test set true
+  -u, --setfalse    test set false
+  -h, --help        print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+All Done!
Index: tests/configs/.expect/parsenums.x64.txt
===================================================================
--- tests/configs/.expect/parsenums.x64.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/configs/.expect/parsenums.x64.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,146 @@
+no arg:
+int                :-3
+unsigned           :3
+unsigned long      :3
+unsigned long long :3
+double             :3.3
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+all 0 arg:
+int                :0
+unsigned           :0
+unsigned long      :0
+unsigned long long :0
+double             :0.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+negative vals arg:
+int                :-1
+unsigned           :3
+unsigned long      :3
+unsigned long long :3
+double             :-1.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+funky notation arg:
+int                :16
+unsigned           :32
+unsigned long      :768
+unsigned long long :16384
+double             :5000000.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+big values arg:
+int                :2147483647
+unsigned           :4294967295
+unsigned long      :18446744073709551615
+unsigned long long :18446744073709551615
+double             :5000000.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+too big values arg:
+Argument '2147483648' for option i could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '4294967296' for option u could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '18446744073709551616' for option l could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '18446744073709551616' for option L could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+negative errors arg:
+Argument '-1' for option u could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '-1' for option l could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '-1' for option L could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+All Done!
Index: tests/configs/.expect/parsenums.x86.txt
===================================================================
--- tests/configs/.expect/parsenums.x86.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/configs/.expect/parsenums.x86.txt	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,146 @@
+no arg:
+int                :-3
+unsigned           :3
+unsigned long      :3
+unsigned long long :3
+double             :3.3
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+all 0 arg:
+int                :0
+unsigned           :0
+unsigned long      :0
+unsigned long long :0
+double             :0.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+negative vals arg:
+int                :-1
+unsigned           :3
+unsigned long      :3
+unsigned long long :3
+double             :-1.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+funky notation arg:
+int                :16
+unsigned           :32
+unsigned long      :768
+unsigned long long :16384
+double             :5000000.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+big values arg:
+int                :2147483647
+unsigned           :4294967295
+unsigned long      :4294967295
+unsigned long long :18446744073709551615
+double             :5000000.
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
+
+too big values arg:
+Argument '2147483648' for option i could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '4294967296' for option u could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '4294967296' for option l could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '18446744073709551616' for option L could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+negative errors arg:
+Argument '-1' for option u could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '-1' for option l could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+Argument '-1' for option L could not be parsed
+
+Usage:
+  parsenums [OPTIONS]...
+testing bool parameters
+  -i, --int                test int
+  -u, --unsigned           test unsigned
+  -l, --unsignedlong       test unsigned long
+  -L, --unsignedlonglong   test unsigned long long
+  -d, --double             test double
+  -h, --help               print this help message
+Child status:
+    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
+
+All Done!
Index: tests/configs/parsebools.cfa
===================================================================
--- tests/configs/parsebools.cfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/configs/parsebools.cfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,188 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <errno.h>
+#include <signal.h>
+
+extern "C" {
+	#include <sys/types.h>
+	#include <sys/wait.h>
+	#include <unistd.h>
+}
+
+#include <parseargs.hfa>
+#include <fstream.hfa>
+
+int true_main(const char * exec);
+
+int main(int argc, char * argv[]) {
+	if(!getenv("CFATEST_FORK_EXEC_TEXT")) return true_main(argv[0]);
+
+	bool YN = false;
+	bool Yn = false;
+	bool yn = false;
+	bool tf = false;
+	bool st = false;
+	bool sf = true;
+
+	cfa_option options[] = {
+		{'e', "yesno",     "test yes/no",     YN, parse_yesno},
+		{'y', "YN",        "test yes/no",     Yn, parse_yesno},
+		{'n', "yn",        "test yes/no",     yn, parse_yesno},
+		{'t', "truefalse", "test true/false", tf, parse_truefalse},
+		{'s', "settrue",   "test set true",   st, parse_settrue},
+		{'u', "setfalse",  "test set false",  sf, parse_setfalse},
+	};
+	int options_cnt = sizeof(options) / sizeof(cfa_option);
+
+	char **left;
+	parse_args( options, options_cnt, "[OPTIONS]...\ntesting bool parameters", left);
+
+	sout | "yes/no     :" | YN;
+	sout | "Y/N        :" | Yn;
+	sout | "y/n        :" | yn;
+	sout | "true/false :" | tf;
+	sout | "set true   :" | st;
+	sout | "set false  :" | sf;
+}
+
+int do_wait(pid_t pid) {
+	int wstatus;
+	int options = 0;
+	pid_t ret = waitpid(pid, &wstatus, options);
+	fflush(stdout);
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	return wstatus;
+}
+
+pid_t strict_fork(void) {
+	fflush(stdout);
+	pid_t ret = fork();
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	return ret;
+}
+
+void print_status(int wstatus) {
+	printf("Child status:\n");
+	printf("    WIFEXITED   : %d", WIFEXITED(wstatus));
+	printf("    WEXITSTATUS : %d", WEXITSTATUS(wstatus));
+	printf("    WIFSIGNALED : %d", WIFSIGNALED(wstatus));
+	printf("    WTERMSIG    : %d", WTERMSIG(wstatus));
+	printf("    WCOREDUMP   : %d", WCOREDUMP(wstatus));
+	printf("    WIFSTOPPED  : %d", WIFSTOPPED(wstatus));
+	printf("    WSTOPSIG    : %d", WSTOPSIG(wstatus));
+	printf("    WIFCONTINUED: %d\n", WIFCONTINUED(wstatus));
+}
+
+int true_main(const char * path) {
+	char * env[] = { "CFATEST_FORK_EXEC_TEXT=1", 0p };
+
+	printf("no arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("all true/set arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-e=yes", "-y=Y", "-n=y", "-t=true", "-s", "-u", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("all false/unset arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-e=no", "-y=N", "-n=n", "-t=false", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("gibberish arg 1:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-y=true", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("gibberish arg 2:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-t=yes", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("gibberish arg 3:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-s=yes", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("gibberish arg 4:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsebools", "-u=yes", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("All Done!\n");
+
+	return 0;
+}
Index: tests/configs/parsenums.cfa
===================================================================
--- tests/configs/parsenums.cfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/configs/parsenums.cfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,261 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <errno.h>
+#include <signal.h>
+
+extern "C" {
+	#include <sys/types.h>
+	#include <sys/wait.h>
+	#include <unistd.h>
+}
+
+#include <parseargs.hfa>
+#include <fstream.hfa>
+
+#if __SIZEOF_LONG__ == 4
+	#define BIG_UNSIGNED_LONG "4294967295"
+	#define TOO_BIG_UNSIGNED_LONG "4294967296"
+#elif  __SIZEOF_LONG__ == 8
+	#define BIG_UNSIGNED_LONG "18446744073709551615"
+	#define TOO_BIG_UNSIGNED_LONG "18446744073709551616"
+#else
+	#error unexpected size of long
+#endif
+
+int true_main(const char * exec);
+
+int main(int argc, char * argv[]) {
+	if(!getenv("CFATEST_FORK_EXEC_TEXT")) return true_main(argv[0]);
+
+	int i = -3;
+	unsigned u = 3;
+	unsigned long ul = 3;
+	unsigned long long ull = 3;
+	double d = 3.3;
+
+
+	cfa_option options[] = {
+		{ 'i', "int",              "test int",                i   },
+		{ 'u', "unsigned",         "test unsigned",           u   },
+		{ 'l', "unsignedlong",     "test unsigned long",      ul  },
+		{ 'L', "unsignedlonglong", "test unsigned long long", ull },
+		{ 'd', "double",           "test double",             d   },
+	};
+	int options_cnt = sizeof(options) / sizeof(cfa_option);
+
+	char **left;
+	parse_args( options, options_cnt, "[OPTIONS]...\ntesting bool parameters", left);
+
+	sout | "int                :" | i;
+	sout | "unsigned           :" | u;
+	sout | "unsigned long      :" | ul;
+	sout | "unsigned long long :" | ull;
+	sout | "double             :" | d;
+}
+
+int do_wait(pid_t pid) {
+	int wstatus;
+	int options = 0;
+	pid_t ret = waitpid(pid, &wstatus, options);
+	fflush(stdout);
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	return wstatus;
+}
+
+pid_t strict_fork(void) {
+	fflush(stdout);
+	pid_t ret = fork();
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	return ret;
+}
+
+void print_status(int wstatus) {
+	printf("Child status:\n");
+	printf("    WIFEXITED   : %d", WIFEXITED(wstatus));
+	printf("    WEXITSTATUS : %d", WEXITSTATUS(wstatus));
+	printf("    WIFSIGNALED : %d", WIFSIGNALED(wstatus));
+	printf("    WTERMSIG    : %d", WTERMSIG(wstatus));
+	printf("    WCOREDUMP   : %d", WCOREDUMP(wstatus));
+	printf("    WIFSTOPPED  : %d", WIFSTOPPED(wstatus));
+	printf("    WSTOPSIG    : %d", WSTOPSIG(wstatus));
+	printf("    WIFCONTINUED: %d\n", WIFCONTINUED(wstatus));
+}
+
+int true_main(const char * path) {
+	char * env[] = { "CFATEST_FORK_EXEC_TEXT=1", 0p };
+
+	printf("no arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("all 0 arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-i=0", "-u=0", "-l=0", "-L=0", "-d=0", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("negative vals arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-i=-1", "-d=-1", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("funky notation arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-i=0x10", "-u=0x20", "-l=0x300", "-L=0x4000", "-d=5e6", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("big values arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-i=2147483647", "-u=4294967295", "-l=" BIG_UNSIGNED_LONG, "-L=18446744073709551615", "-d=5e6", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("too big values arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-i=2147483648", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-u=4294967296", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-l=" TOO_BIG_UNSIGNED_LONG, (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-L=18446744073709551616", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("negative errors arg:\n");
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-u=-1", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-l=-1", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	if(pid_t child = strict_fork(); child == 0) {
+		int ret = execle(path, "parsenums", "-L=-1", (const char*)0p, env);
+		if(ret < 0) {
+			fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));
+			exit(1);
+		}
+	}
+	else {
+		int status = do_wait(child);
+		print_status(status);
+	}
+	printf("\n");
+
+	printf("All Done!\n");
+
+	return 0;
+}
Index: tests/meta/fork+exec.cfa
===================================================================
--- tests/meta/fork+exec.cfa	(revision 116a2ead213b741d89ecb016dba4e1dd7d9b6e6a)
+++ tests/meta/fork+exec.cfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -13,21 +13,9 @@
 // Update Count     :
 //
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
 
-#include <errno.h>
-#include <signal.h>
-
-extern "C" {
-	#include <sys/types.h>
-	#include <sys/wait.h>
-	#include <unistd.h>
-}
-
-int true_main(const char * exec);
+#include "fork+exec.hfa"
 
 int main(int argc, char * argv[]) {
-	if(!getenv("CFATEST_FORK_EXEC_TEXT")) return true_main(argv[0]);
+	check_main(argv[0]);
 
 	printf("arguments are:\n");
@@ -42,41 +30,7 @@
 }
 
-int do_wait(pid_t pid) {
-	int wstatus;
-	int options = 0;
-	pid_t ret = waitpid(pid, &wstatus, options);
-	fflush(stdout);
-	if(ret < 0) {
-		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
-		exit(1);
-	}
-	return wstatus;
-}
 
-pid_t strict_fork(void) {
-	fflush(stdout);
-	pid_t ret = fork();
-	if(ret < 0) {
-		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
-		exit(1);
-	}
-	return ret;
-}
 
-void print_status(int wstatus) {
-	printf("Child status:\n");
-	printf("    WIFEXITED   : %d\n", WIFEXITED(wstatus));
-	printf("    WEXITSTATUS : %d\n", WEXITSTATUS(wstatus));
-	printf("    WIFSIGNALED : %d\n", WIFSIGNALED(wstatus));
-	printf("    WTERMSIG    : %d\n", WTERMSIG(wstatus));
-	printf("    WCOREDUMP   : %d\n", WCOREDUMP(wstatus));
-	printf("    WIFSTOPPED  : %d\n", WIFSTOPPED(wstatus));
-	printf("    WSTOPSIG    : %d\n", WSTOPSIG(wstatus));
-	printf("    WIFCONTINUED: %d\n", WIFCONTINUED(wstatus));
-}
-
-int true_main(const char * path) {
-	char * env[] = { "CFATEST_FORK_EXEC_TEXT=1", 0p };
-
+int true_main(const char * path, char * env[]) {
 	printf("no arg:\n");
 	if(pid_t child = strict_fork(); child == 0) {
Index: tests/meta/fork+exec.hfa
===================================================================
--- tests/meta/fork+exec.hfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
+++ tests/meta/fork+exec.hfa	(revision e5256bd79044db0f54f2e025c35dfa7f574683fc)
@@ -0,0 +1,72 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2022 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// fork+exec.hfa -- tools for using fork + exec
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Oct 06 14:02:46 2022
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <stdarg.h>										// va_start, va_end
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <errno.h>
+#include <signal.h>
+
+extern "C" {
+	#include <sys/types.h>
+	#include <sys/wait.h>
+	#include <unistd.h>
+}
+
+static int true_main(const char * exec, char * env[]);
+
+static int do_wait(pid_t pid) {
+	int wstatus;
+	int options = 0;
+	pid_t ret = waitpid(pid, &wstatus, options);
+	fflush(stdout);
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	return wstatus;
+}
+
+static pid_t strict_fork(void) {
+	fflush(stdout);
+	pid_t ret = fork();
+	if(ret < 0) {
+		fprintf(stderr, "Fork returned with error: %d '%s'\n", errno, strerror(errno));
+		exit(1);
+	}
+	if(ret == 0) dup2(1, 2);
+	return ret;
+}
+
+static void print_status(int wstatus) {
+	printf("Child status:\n");
+	printf("    WIFEXITED   : %d\n", WIFEXITED(wstatus));
+	printf("    WEXITSTATUS : %d\n", WEXITSTATUS(wstatus));
+	printf("    WIFSIGNALED : %d\n", WIFSIGNALED(wstatus));
+	printf("    WTERMSIG    : %d\n", WTERMSIG(wstatus));
+	printf("    WCOREDUMP   : %d\n", WCOREDUMP(wstatus));
+	printf("    WIFSTOPPED  : %d\n", WIFSTOPPED(wstatus));
+	printf("    WSTOPSIG    : %d\n", WSTOPSIG(wstatus));
+	printf("    WIFCONTINUED: %d\n", WIFCONTINUED(wstatus));
+}
+
+static void check_main(const char * path) {
+	if(getenv("CFATEST_FORK_EXEC_TEXT")) return;
+
+	char * env[] = { "CFATEST_FORK_EXEC_TEXT=1", 0p };
+	exit( true_main(path, env) );
+}
