[PATCH v5 3/3] Add tests for the -l/--syscall-limit option

Dmitry V. Levin ldv at strace.io
Sun Mar 26 11:34:13 UTC 2023


On Mon, Mar 20, 2023 at 11:10:58AM +0530, Sahil Siddiq wrote:
[...[
> +	return WEXITSTATUS(status);

I forgot to note that WEXITSTATUS(status) is defined only when
WIFEXITED(status) == true.  If, e.g. the child process was terminated
by signal, WEXITSTATUS is undefined.

I suggest changing it to something like
WIFEXITED(status) ? WEXITSTATUS(status) : 1
instead.


-- 
ldv


More information about the Strace-devel mailing list