From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68787A034E; Wed, 9 Feb 2022 16:45:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2881441144; Wed, 9 Feb 2022 16:45:24 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 6DFA441143 for ; Wed, 9 Feb 2022 16:45:23 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id r64-20020a17090a43c600b001b8854e682eso2639203pjg.0 for ; Wed, 09 Feb 2022 07:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zd1Td1qIdIXJuuUcATnqLpA4i4QDvMJDr1nuyeUjFeA=; b=35/N+cRvD+RwuwP4LBb2vSaDmXSxnBmpE/EiPEb6sBUAIUCGD+Emgmi78/U+5Z0+dD 78AoiVAfRvcQzBp0iYizHHcEwKWkuDd/1V7jRpl/Is16KkrORKgicoISTqX2qp/fwsE+ jttz5mOqqHvz2tAJP98ogImSD2AGo13gWDbt4YcKx5RaBY7RU5kUKoa4W/4EDvGk3ge+ 4zyEhcikMFOGYmuxWfQqMQJtxRBRg0r+O+MbSG8ylMT9SACZ48BmLXHNgSUVNM4rk7Yw 2fIsQZiKo11d6G0OqFtxg9QKnD5Te3chsT7FIMj+6fNrLNhB3GMDxa3dqS4LnHIxRmYW 0ETg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zd1Td1qIdIXJuuUcATnqLpA4i4QDvMJDr1nuyeUjFeA=; b=l4/lZ9vppjGLfluLxPADl3SQRN5vldAOBCMaffTNGtkL7uIdBhfWQ1rh6NpCBeUb5z uMwbrZD3mXhn1PTVGqZXwfIMTR4hRK/3tr4xFz3TvFT8Nq2gDNo7OQ2rOueWxZfBudif PyUDlughtIbfK9B6sxS7IHr+ojr/dg/XhovVKhW+T2uBYIZsAYGBIu+W4G65qfhXF2iC Bm4fs60H4YvE8mLGoAD3W3U5mXQ7ZaYCEZq570PtEZnumMufpDevrrQJ9j8BEbrWtmf2 EzezVkDz7DOT5rwtnQ8LKywJu6c+V9Fb96kdiUzqzFOl6/kXD79V/z3CLx939MWkL9/O XGug== X-Gm-Message-State: AOAM531KxdTkhsoGb3Z0isrUXzlSzGu5VDwQboAXSidcB4euZNwqds0w EAKV9dTGkqCCiczSnuAOlC9Miw== X-Google-Smtp-Source: ABdhPJz0Br/O4ZRYh5yc/18qeZ+HtxjaMqsD4+/7FDUSc66QFumnii+Qd8+XGfMdtGGcSYwdP/11Tg== X-Received: by 2002:a17:90b:4f8d:: with SMTP id qe13mr4066549pjb.170.1644421522442; Wed, 09 Feb 2022 07:45:22 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id d20sm20066353pfu.9.2022.02.09.07.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 07:45:21 -0800 (PST) Date: Wed, 9 Feb 2022 07:45:19 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, Stephen Hemminger , david.marchand@redhat.com Subject: Re: [PATCH] eal: remove unnecessary argv[0] handling Message-ID: <20220209074519.6b3f3f5e@hermes.local> In-Reply-To: <2032198.bB369e8A3T@thomas> References: <20220202194738.404876-1-stephen@networkplumber.org> <2032198.bB369e8A3T@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 09 Feb 2022 15:58:26 +0100 Thomas Monjalon wrote: > 02/02/2022 20:47, Stephen Hemminger: > > The rte_eal_init function looks at argv[0] to determine > > the program name to pass to the log init function. > > This is both unnecessary and in a corner case a problem. > > > > Parsing argv[0] is unnecessary because the function openlog() > > already determines the log identifier from program name if > > NULL is passed, see openlog man page: > > The string pointed to by ident is prepended to every message, and is > > typically set to the program name. If ident is NULL, the program name > > is used. (POSIX.1-2008 does not specify the behavior when ident is > > NULL.) > > What about POSIX warning? > Did you test it? Which libc? What about musl? Source for musl shows that openlog accepts NULL as ident. It then generates log messages with ident in the message.