[RFC PATCH 3/7] PID namespace translation support
Eugene Syromiatnikov
esyr at redhat.com
Wed Jun 10 21:13:59 UTC 2020
On Wed, Jun 10, 2020 at 08:34:49PM +0200, Ãkos Uzonyi wrote:
> > +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?
PID is considered to be signed, so the expected output in the tests
ought to be updated accordingly.
More information about the Strace-devel
mailing list