diff options
author | Andreas Schwab <schwab@suse.de> | 2021-06-21 11:32:59 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-07-07 21:16:58 +0200 |
commit | 7aa9fe3a520266cbbe16c249381fe542f9e4c6a4 (patch) | |
tree | fd4f956018e4e1b9792348a21f019d112a8faf9d /linux-user/syscall.c | |
parent | cb46938c45144045c1ae278abb05b6a1cf2de445 (diff) |
linux-user: fill ppid field in /proc/self/stat
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvmwnqnef5g.fsf@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 64bbf331b2..3bc06d178e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7956,6 +7956,9 @@ static int open_self_stat(void *cpu_env, int fd) gchar *bin = g_strrstr(ts->bprm->argv[0], "/"); bin = bin ? bin + 1 : ts->bprm->argv[0]; g_string_printf(buf, "(%.15s) ", bin); + } else if (i == 3) { + /* ppid */ + g_string_printf(buf, FMT_pid " ", getppid()); } else if (i == 27) { /* stack bottom */ g_string_printf(buf, TARGET_ABI_FMT_ld " ", ts->info->start_stack); |