aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2025-05-20 16:07:37 +0200
committerRichard Henderson <richard.henderson@linaro.org>2025-05-28 08:07:59 +0100
commit19f036726a416c9248c19befe544a2d30b099a25 (patch)
treefd30472ce02c743f5f4fe8fd3bdf69567da13963
parent556d05d1e2ac687463ce2877cb4acd1b0589deed (diff)
downloadqemu-19f036726a416c9248c19befe544a2d30b099a25.zip
qemu-19f036726a416c9248c19befe544a2d30b099a25.tar.gz
qemu-19f036726a416c9248c19befe544a2d30b099a25.tar.bz2
linux-user: implement pgid field of /proc/self/stat
Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <mvmfrgzcr4m.fsf@suse.de>
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 23b901b..fc37028 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;