[PATCH v3 1/7] Use printpid for printing pid of pidfd

Masatake YAMATO yamato at redhat.com
Thu Sep 9 13:43:31 UTC 2021


* src/util.c (printpidfd): Use printfd instead of
PRINT_VAL_D.

Suggested-by: Ákos Uzonyi <uzonyi.akos at gmail.com>
Signed-off-by: Masatake YAMATO <yamato at redhat.com>
---
 src/util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/util.c b/src/util.c
index c944b3816..26f07e06f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -641,7 +641,11 @@ printpidfd(pid_t pid_of_fd, int fd, const char *path)
 		return false;
 
 	tprints("pid:");
-	PRINT_VAL_D(pid);
+	/*
+	 * The pid translation is not needed because
+	 * the pid is in strace's namespace.
+	 */
+	printpid(NULL, pid, PT_TID);
 	return true;
 }
 
-- 
2.31.1



More information about the Strace-devel mailing list