Message ID | 20230816025135.613166-1-vladimir.mezentsev@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 292303858002 for <patchwork@sourceware.org>; Wed, 16 Aug 2023 02:52:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 292303858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692154335; bh=spVdWwwr9fQ1fd6SLG7PLYy+cE8djSdx7rx/A+ztwMk=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=NUgWsy51jnKqgB4yDSkELAnyz67v+Ze2tW7Fv7Ch1ztpF7xlhGLTitjq7LxIFFVK5 iXCEKMiSVCSbetgREzqLe5mY4tWBLeRpLuQ3GMHM/rGE9RHnnGcg66hrBSv13HL9hX XQLAl7eNf573++eB2ofVGoOMQn6DyHdx/VoTc7oM= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 3030F3858288 for <binutils@sourceware.org>; Wed, 16 Aug 2023 02:51:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3030F3858288 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37FNP5h1023145 for <binutils@sourceware.org>; Wed, 16 Aug 2023 02:51:45 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3se2yfp0j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 16 Aug 2023 02:51:45 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37G0F2wV019863 for <binutils@sourceware.org>; Wed, 16 Aug 2023 02:51:44 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3sey3w2vt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 16 Aug 2023 02:51:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WBOvhv6dKXgDOhLE8A2osktRIiUi82MXJ8w99xRUFEbMKZKX/dtf8JMZc6q/9xOO+0g2+0jUl2dkktU5XtFyWeMGKyLyLMoqHA1XaFlE4s0mPSzMyaEnYZRa7hNrGN2rwa+JK9bLb646CUn1j/CHNjkRuzpz7otEfsX8T9DrfMq4z1IvPnwnFAI07c01B5JL1hjT9gNkzH2ioUCmOEes+uaOgj2kDPXWXagIY/IVJdDCt86hJTDN+mPDWzocdQObnm+GuarKUUBDr/JwZq+sEjmNIG/cRHeFkJaZHtvwa8qtl8h6jMp+jF7DdBsEmsSz2vs96+15KcmWtYxhfBhfcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=spVdWwwr9fQ1fd6SLG7PLYy+cE8djSdx7rx/A+ztwMk=; b=LI0euo5jsCsIjGmkxtUR0N47s4EqKeXzx++4cmJvgIckmeZsi+V1PbJolGe2M4Wo0x3aZlaSUryG+TwQV6+X/KroQbAhFxbEYkvnmHQzIBzat/YI9g93Lb0B86AmOottJXamiuwLS424+MHiCs8kVXt/Ikl4n9OL0LDTQ3f3iCri6tiHpGOBo2ABClbl7h7anW3mYguUGX6Cyjimgf1/1c6jRbBJDNxKomGOJwZdsH/in6T5y/IimkBd5BQYkVVrZX+is5E4jx9xmmMWHwIm1qq2lRpaatSlnWN2QrpFP2PTPcOToowIsBvEut2bCNoikF4joDIMM5Ps+bgJtvw3lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) by BLAPR10MB5010.namprd10.prod.outlook.com (2603:10b6:208:30d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Wed, 16 Aug 2023 02:51:41 +0000 Received: from SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::a15b:c87d:10e3:5765]) by SA2PR10MB4636.namprd10.prod.outlook.com ([fe80::a15b:c87d:10e3:5765%7]) with mapi id 15.20.6678.025; Wed, 16 Aug 2023 02:51:40 +0000 To: binutils@sourceware.org Cc: Vladimir Mezentsev <vladimir.mezentsev@oracle.com> Subject: [PATCH] gprofng: Use execvp instead of execv Date: Tue, 15 Aug 2023 19:51:35 -0700 Message-Id: <20230816025135.613166-1-vladimir.mezentsev@oracle.com> X-Mailer: git-send-email 2.31.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA1PR05CA0023.namprd05.prod.outlook.com (2603:10b6:806:2d2::17) To SA2PR10MB4636.namprd10.prod.outlook.com (2603:10b6:806:11e::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PR10MB4636:EE_|BLAPR10MB5010:EE_ X-MS-Office365-Filtering-Correlation-Id: 62be66fc-9c00-4d26-c6e5-08db9e03b7b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R/JhSjifdsKcyWXXeJ2ZtPQ2EXERly+joY6PpvzDimdUYhDJR8P/5yQAZ+kdE07re72wkoSY1/5z5M9huT0U0U7Vb7tkhBwOsVnpqS4GbWws3L9XrXkpw4CXEDFhvyUi4myMA+0uFIXO4dj8j3H4oAA7GMd+0FswlMzgl+hY9O9Ex7E9/6WfqyJ6xujzcIfZ41FdaUeIm+9K3iS1cErNB5fZhcRqGEYFwaBKBAzDj5WcCrtdZlm/sDsZJp70KmRuAsr/ZIS8j0aClEULK1uRJnHaQh7oZyT9JGSaQDDrSCrArRJ0rbHbzFaggx/uPN0Ium2kLAFoXf8+CtR2SCxH1y1tmnSulw2Jf52eoxJG3VLFTEdiAbqrLqXDr1zb6DeXW9ZN8HLLovsrf972GAWAMIY5hon9jOCI/Vc/Ngf9m0Ylvi/6k0NQVvRRA7nAZEGhrzCe4WfdlbZ1lUXcxftj1ZB5JtY9m7/sQZ56/aCC9GnMSLFJ0/k3B3ec7WbLQOOKhVmIvIEy2o73HXhBNfE0I51MOQ2xi334JFJiQgTwz3I= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4636.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(39860400002)(396003)(346002)(136003)(1800799009)(451199024)(186009)(6666004)(66476007)(66556008)(66946007)(6512007)(6486002)(6506007)(2906002)(478600001)(9686003)(1076003)(6916009)(107886003)(5660300002)(2616005)(83380400001)(41300700001)(316002)(8936002)(4326008)(8676002)(38100700002)(36756003)(86362001); DIR:O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XKWttUaGFiyw0X+2xKhOBmAcVzg9wpgSyMFEeawUs01nAJ0gpqMkH2LgRYdZ+8QQBi0c2+RUQszZxpS4qy5Cd7t6g4F/+/1rzVViqwpjF4RWw5OJzrH3706D4Q97Nu2efKj4rKufbi+gxBrSIJ7AABuVolqMPzvekEimNyBLSjM7P+Oy46HkCJqYgZJWVCZDcpM7tpyTmlQdFm25pj1RK+FuY+5fWnCMH6ilRCZ4qiC/ypWZIEm7lyMlIIyeaEMtrH30l7kKuOiBhXEXwNJurMZGo1mtLqPkv3UbGmhnQIXWqDvdSbPQm0XWDkgweeLpOUST9NFdH4md783B3l13YPSGvkhOOC3y6Mh8GyqC3tWeHsYSfPWzOeb4UjW6kyrst+f0b61 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62be66fc-9c00-4d26-c6e5-08db9e03b7b3 X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4636.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2023 02:51:40.9154 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GFbnf+Ghhfi02bBHSZx0NWDPuFIvUSaIi1kXCKDDXcfTBp3MKqjeUCBW4PkO9ROe0GkRmC+7BMnMJS5yLFosK5oKOaIVgc6MF0yHWqDqg/M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-15_22,2023-08-15_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308160025 X-Proofpoint-ORIG-GUID: Ch3Rnx25cmsz_xGV5ivnJANn3dI-Aoa9 X-Proofpoint-GUID: Ch3Rnx25cmsz_xGV5ivnJANn3dI-Aoa9 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Vladimir Mezentsev via Binutils <binutils@sourceware.org> Reply-To: vladimir.mezentsev@oracle.com Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Sender: "Binutils" <binutils-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gprofng: Use execvp instead of execv
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | warning | Patch is already merged |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | warning | Patch is already merged |
linaro-tcwg-bot/tcwg_binutils_build--master-arm | warning | Patch is already merged |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | warning | Patch is already merged |
Commit Message
Vladimir Mezentsev
Aug. 16, 2023, 2:51 a.m. UTC
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
I changed the commit message to explain the issue.
gp-display-gui (https://savannah.gnu.org/projects/gprofng-gui)
can be installed in a different directory.
In this case, $PATH is used to look up gp-display-text.
execv() does not use $PATH to find the executable.
gprofng/ChangeLog
2023-08-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
* src/gp-display-text.cc (reexec): Use execvp instead of execv.
---
gprofng/src/gp-display-text.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gprofng/src/gp-display-text.cc b/gprofng/src/gp-display-text.cc index 0d0a5e75e44..85ae274fc63 100644 --- a/gprofng/src/gp-display-text.cc +++ b/gprofng/src/gp-display-text.cc @@ -20,6 +20,7 @@ #include "config.h" #include <unistd.h> // isatty +#include <errno.h> #include "gp-print.h" #include "ipcio.h" @@ -55,7 +56,11 @@ reexec () { if (dbeSession != NULL) dbeSession->unlink_tmp_files (); - execv (exe_name, new_argv); + execvp (exe_name, new_argv); + fprintf (stderr, GTXT ("Error: reexec() failed (%d: %s)\n"), errno, + STR(strerror (errno))); + fflush (stderr); + exit (1); } /**