From 19f036726a416c9248c19befe544a2d30b099a25 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 20 May 2025 16:07:37 +0200 Subject: [PATCH] linux-user: implement pgid field of /proc/self/stat Signed-off-by: Andreas Schwab Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 23b901b7133..fc37028597c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8235,6 +8235,9 @@ static int open_self_stat(CPUArchState *cpu_env, int fd) } else if (i == 3) { /* ppid */ g_string_printf(buf, FMT_pid " ", getppid()); + } else if (i == 4) { + /* pgid */ + g_string_printf(buf, FMT_pid " ", getpgrp()); } else if (i == 19) { /* num_threads */ int cpus = 0; -- 2.47.2