From nobody Thu May 2 11:02:53 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1624268189; cv=none; d=zohomail.com; s=zohoarc; b=FZIlM3XwzzlzxTb+jwZ0ydeq3ZKzYtgnVWk3TzvlABxxP175Q6gAIIwSxqE0aJBBRC2nbFwN93d/TO7y/OMrWN1RdJ8nIYg221cmwsBzalpnrYrXAEbxFn48ckLIbGEyJKYpUEhg760dB3ce9twr5iqvwMqJS0flPvjmjtCdetc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624268189; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=eqRE7qmcA+ACgFVUsG730VxH4AJiybneGdnbtljZOVs=; b=lRrK6hCxd9dePAjZqF+fP7x5aomTFLDP/DXipRIkb3LBHyAnzY02a9DF7ytOV2+daUdh3AT7MeEw5t4LWRVV1NWDbmwN5TQVszeEaQie8YlZMSfrQYgOTnNlOBbOnKrp5b9oQCzaFrSUIYYs9uRh7y2+OP5L486VujvhAF7b58E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162426818926176.8354924932687; Mon, 21 Jun 2021 02:36:29 -0700 (PDT) Received: from localhost ([::1]:49322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvGM0-0000B8-72 for importer2@patchew.org; Mon, 21 Jun 2021 05:36:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvGIg-0005V2-Th for qemu-devel@nongnu.org; Mon, 21 Jun 2021 05:33:03 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:60744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvGIf-0007Ia-6z for qemu-devel@nongnu.org; Mon, 21 Jun 2021 05:33:02 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D454121962; Mon, 21 Jun 2021 09:32:59 +0000 (UTC) Received: from hawking.suse.de (hawking.suse.de [10.160.4.0]) by relay2.suse.de (Postfix) with ESMTP id CDCF3A3BAC; Mon, 21 Jun 2021 09:32:59 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id C20D344618D; Mon, 21 Jun 2021 11:32:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624267979; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=eqRE7qmcA+ACgFVUsG730VxH4AJiybneGdnbtljZOVs=; b=CUWTApyQJmggTBFwln+jgbgvOiGjxwfCkiuOADIrGmLNlQA7m3m+n4BwwCWyk4jb1GF9Cj KKu0Qye0t+VLT+tVGQExHl/N0MGdrNSv+87lRCZg0qhijMQVeHrNCY5yxc9bJ4aPKSHZCf llkQ/HN/l36R88JFGa+e6s1w9CfxNd8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624267979; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=eqRE7qmcA+ACgFVUsG730VxH4AJiybneGdnbtljZOVs=; b=L0GhVgc/C4LJxK6yF7WfvBHJHPSUKLY25GaQi3qbtzqKiWhqPrB6vAzyPD2kjxrLTGAAw5 jvFW+LVi7FXCa9Bg== From: Andreas Schwab To: Laurent Vivier Subject: [PATCH] linux-user: fill ppid field in /proc/self/stat X-Yow: I'm having BEAUTIFUL THOUGHTS about the INSIPID WIVES of smug and wealthy CORPORATE LAWYERS.. Date: Mon, 21 Jun 2021 11:32:59 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.28; envelope-from=schwab@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.de) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 974dd46c9a..dababe463c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7940,6 +7940,9 @@ static int open_self_stat(void *cpu_env, int fd) gchar *bin =3D g_strrstr(ts->bprm->argv[0], "/"); bin =3D bin ? bin + 1 : ts->bprm->argv[0]; g_string_printf(buf, "(%.15s) ", bin); + } else if (i =3D=3D 3) { + /* ppid */ + g_string_printf(buf, FMT_pid " ", getppid()); } else if (i =3D=3D 27) { /* stack bottom */ g_string_printf(buf, TARGET_ABI_FMT_ld " ", ts->info->start_st= ack); --=20 2.31.1 --=20 Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."