]> granicus.if.org Git - strace/commitdiff
waitid: print pid argument as int
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Feb 2016 02:42:36 +0000 (02:42 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Feb 2016 03:06:17 +0000 (03:06 +0000)
* wait.c (SYS_FUNC(waitid)): As the type of second syscall argument
in the kernel is pid_t, print it as int.

wait.c

diff --git a/wait.c b/wait.c
index 39badf277abf8d08f293b63cf893c3ff6e4de673..fc7601799a56ee9c139c96eaba097f7ced757e24 100644 (file)
--- a/wait.c
+++ b/wait.c
@@ -180,7 +180,8 @@ SYS_FUNC(waitid)
 {
        if (entering(tcp)) {
                printxval(waitid_types, tcp->u_arg[0], "P_???");
-               tprintf(", %ld, ", tcp->u_arg[1]);
+               int pid = tcp->u_arg[1];
+               tprintf(", %d, ", pid);
        } else {
                /* siginfo */
                printsiginfo_at(tcp, tcp->u_arg[2]);