[RFC PATCH 3/7] PID namespace translation support

Ákos Uzonyi uzonyi.akos at gmail.com
Wed Jun 10 18:34:49 UTC 2020


> +void
> +printpid(struct tcb *tcp, int pid, enum pid_type type)
> +{
> +       int strace_pid;
> +
> +       tprintf("%d", pid);
> +
> +       if (perform_ns_resolution) {
> +               strace_pid = translate_pid(tcp, pid, type, NULL);
> +
> +               if ((strace_pid > 0) && (pid != strace_pid))
> +                       tprintf_comment("%d in strace's PID NS", strace_pid);
> +       }
> +}

Printing PID as a signed integer causes a few tests to fail
(overflow). Should we use unsigned int for PIDs, or modify the tests?


More information about the Strace-devel mailing list