public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: "Cristian Rodríguez" <crrodriguez@opensuse.org>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/2] linux: posix_spawn: return EINVAL on argc < 1
Date: Fri, 28 Jan 2022 23:49:46 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2201282347300.666813@digraph.polyomino.org.uk> (raw)
In-Reply-To: <CAPBLoAf4u==WbWc8AWBFSbjXvAvH=zGHyPAR6_SRGhviq-vuBg@mail.gmail.com>

On Fri, 28 Jan 2022, Cristian Rodríguez wrote:

> On Fri, Jan 28, 2022 at 8:26 PM Joseph Myers <joseph@codesourcery.com> 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

  reply	other threads:[~2022-01-28 23:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 13:39 Cristian Rodríguez
2022-01-28 15:26 ` Cristian Rodríguez
2022-01-28 17:07   ` Adhemerval Zanella
2022-01-28 18:03     ` Joseph Myers
2022-01-28 23:05       ` Adhemerval Zanella
2022-01-28 23:26         ` Joseph Myers
2022-01-28 23:35           ` Cristian Rodríguez
2022-01-28 23:49             ` Joseph Myers [this message]
2022-01-29  1:04               ` Cristian Rodríguez
2022-03-23 14:40                 ` Cristian Rodríguez
2022-01-28 19:08     ` Cristian Rodríguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2201282347300.666813@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=crrodriguez@opensuse.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).