From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id DE820385BF99 for ; Fri, 28 Jan 2022 23:49:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE820385BF99 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: M1bi7Rtnud5txV38Y7h5/BYLlDXR7MqJy9IiZ4XTmZzyyHszG2TKTAJybj+9mjBus8KgwU9B/u H/A9XdSNGD2oNrcJWRIMZCxC5p0nDXlbkTPfHgeoTKda3+9O9BbaxfOoqo50Z+SCCTaLmG0Xzk 10OkUr3gvb+RfVkW6MtGzFsDewuTiD6a17/mgeKWdEfP9lS93CKqg8+3JyzEW8dptIuSFI1eZO DlcjpXq8LqiVHVhy/jtKX8Q2wV9AP+QYSmWp50m8dQOoqB6K/HeeccLaD4i0iycItGWrRw4oqu tIKI5+qIP4q79OmFVghiXBS2 X-IronPort-AV: E=Sophos;i="5.88,325,1635235200"; d="scan'208";a="71199936" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 28 Jan 2022 15:49:52 -0800 IronPort-SDR: mOkG1+TzWlz5cNhMfi+dDJiG3BS+B9ogTGFMwEu5Pxzws/LUNwccjU+3GWPC3fPLFfi5iyuLFe 8cSJrnMdZ+S0bKsHtG8OpY8EXADFZuc1NeIEWV8aLf4igT9lJrVFlox9Y010IAMYh/U2GNBimZ 5J2hL4gvCjrXa1Tov8nW4jxCgyBf9vRd2Lcy3l3RJ5Xzs61FtY+hPFA8x80ytnynUFbG148KTu +4xLZFhh7w0iGhU0PXWXqkq0RPnnYGqqfeFugOXbmNH9IooV8HedKZE6qrSc7/riOF+HMARyri tRU= Date: Fri, 28 Jan 2022 23:49:46 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: =?ISO-8859-15?Q?Cristian_Rodr=EDguez?= CC: Subject: Re: [PATCH 2/2] linux: posix_spawn: return EINVAL on argc < 1 In-Reply-To: Message-ID: References: <20220128133937.9555-1-crrodriguez@opensuse.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3114.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 23:49:54 -0000 On Fri, 28 Jan 2022, Cristian Rodríguez wrote: > On Fri, Jan 28, 2022 at 8:26 PM Joseph Myers wrote: > > > > On Fri, 28 Jan 2022, Adhemerval Zanella via Libc-alpha wrote: > > > > > We can add a note on deprecated and removed features, but I am not sure > > > if would make any difference now that kernels will changes the semantic > > > anyway and it will cause compatibility issues anyway. > > > > I haven't seen any discussions of this on linux-api, so the kernel > > discussion elsewhere might not be taking any compatibility issues properly > > into account. > > but making things in libc calling execve potentially with argc == 0 > error out or behave like having argv = {"", NULL} shouldn't break > anything right ? Errors for argc == 0 (with argv != NULL) are contrary to POSIX, which allows that case other than for Strictly Conforming POSIX Applications, that being the meaning of "should" here. (It's possible that in fact many applications that would break also use argv == NULL, which isn't valid in POSIX, rather than argv pointing to an array containing a single NULL pointer, which is valid.) -- Joseph S. Myers joseph@codesourcery.com