From: Leandro Lucarella Date: Thu, 9 Sep 2010 21:33:56 +0000 (-0300) Subject: Change 'no_fork' option to 'fork' X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/commitdiff_plain/c216b75a02d7b09c6949be6ec102b5557a060c08?hp=6a40cbf5959226bf1e6ec7bdb6c7e03253072c28 Change 'no_fork' option to 'fork' Even when using fork is a little more verbose, since fork=0 must be specified to disable forking, it's more consistent with other options. --- diff --git a/rt/gc/cdgc/opts.d b/rt/gc/cdgc/opts.d index dc2c8de..97414bd 100644 --- a/rt/gc/cdgc/opts.d +++ b/rt/gc/cdgc/opts.d @@ -89,8 +89,8 @@ void process_option(char* opt_name, char* opt_value) options.mem_stomp = parse_bool(opt_value); else if (cstr_eq(opt_name, "conservative")) options.conservative = parse_bool(opt_value); - else if (cstr_eq(opt_name, "no_fork")) - options.fork = !parse_bool(opt_value); + else if (cstr_eq(opt_name, "fork")) + options.fork = parse_bool(opt_value); else if (cstr_eq(opt_name, "eager_alloc")) options.eager_alloc = parse_bool(opt_value); } @@ -164,7 +164,7 @@ unittest assert (fork == true); assert (eager_alloc == true); } - parse("mem_stomp=0:verbose=2:conservative:no_fork=10:eager_alloc=0"); + parse("mem_stomp=0:verbose=2:conservative:fork=0:eager_alloc=0"); with (options) { assert (verbose == 2); assert (log_file[0] == '\0');