public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: tomas@tuxteam.de
To: Peng Yu <pengyu.ut@gmail.com>
Cc: libc-help <libc-help@sourceware.org>
Subject: Re: When is it OK to pass NULLs to the 2nd and 3rd args of execve()?
Date: Fri, 9 Apr 2021 19:32:04 +0200	[thread overview]
Message-ID: <20210409173204.GD13192@tuxteam.de> (raw)
In-Reply-To: <CABrM6wkFgO6wBFxVoh2xuWJ7rrBrh=tZrn8irE53ztyg3RCGAQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

On Fri, Apr 09, 2021 at 12:20:50PM -0500, Peng Yu wrote:

[man page]

> The above paragraph also reads awkwardly. Why it first mentions `On
> many other ... argv as NULL ... Some other UNIX ... envp==NULL`? It
> seems to be contrasting two cases. But then it should be either argv
> or envp but not mentioning both. So it is confusing.

I don't know. I read it as "anything can happen, so don't do it",
for any of argv and envp or both.

> What systems have glibc been ported to? On all these systems, are
> there specifics on what systems argv=NULL causes EFAULT?

I don't know :-)

> Does the above paragraph mean envp=NULL can also cause EFAULT? I don't
> get what error could envp=NULL cause?

Perhaps. It seems to be the kernel's realm and libc just passes things
around, so you'd have to look into the respective kernel documentation.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-04-09 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 16:53 Peng Yu
2021-04-09 17:03 ` tomas
2021-04-09 17:20   ` Peng Yu
2021-04-09 17:32     ` tomas [this message]
2021-04-09 22:06 ` Mike Frysinger

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=20210409173204.GD13192@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=libc-help@sourceware.org \
    --cc=pengyu.ut@gmail.com \
    /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).