is there a way to do it? cmd_run returns bool (true for zero error code, false for non-zero). But I want the actual exit code number.
Maybe cmd_run should return int instead of bool? that would be a breaking change, but maybe it makes sense.
The other way to do it is via a pointer in the Opt.
e.g.
int exit_code;
cmd_run(&cmd, .exit_code = &exit_code);
and cmd_run would assign the exit code to the pointee.
is there a way to do it?
cmd_runreturns bool (true for zero error code, false for non-zero). But I want the actual exit code number.Maybe
cmd_runshould return int instead of bool? that would be a breaking change, but maybe it makes sense.The other way to do it is via a pointer in the Opt.
e.g.
and
cmd_runwould assign the exit code to the pointee.