Skip to contentSkip to conversation

linux-user: implement pgid field of /proc/self/stat

PATCH Applied Andreas Schwab 2 participants 3 messages May 20, 2025 – May 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: implement pgid field of /proc/self/stat

---
 linux-user/syscall.c | 3 +++
 1 file changed, 3 insertions(+)
linux-user/syscall.c +3 -0
index 8820ca4dfd..5536e364dc 100644
@@ -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;
Signature · 7 lines
2.49.0


-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Andreas Schwab
---
  linux-user/syscall.c | 3 +++
  1 file changed, 3 insertions(+)
linux-user/syscall.c +0 -0
index 8820ca4dfd..5536e364dc 100644

linux-user/syscall.c static int open_self_stat(CPUArchState *cpu_env, int fd) · line 8243

Quoted 9 lines
linux-user/syscall.c +3 -0
@@ -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;

r~

#2 lore raw
In reply to Andreas Schwab
Quoted 10 lines · Andreas Schwab
---
  linux-user/syscall.c | 3 +++
  1 file changed, 3 insertions(+)
linux-user/syscall.c +0 -0
index 8820ca4dfd..5536e364dc 100644

linux-user/syscall.c static int open_self_stat(CPUArchState *cpu_env, int fd) · line 8243

Quoted 9 lines
linux-user/syscall.c +3 -0
@@ -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;

Queued, thanks.

r~