public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2] Use execveat syscall in fexecve
Date: Thu, 14 Sep 2017 13:44:00 -0000	[thread overview]
Message-ID: <a609bbfb-3670-19ad-b012-f829b7afb0be@linaro.org> (raw)
In-Reply-To: <mvm1sn9aepa.fsf@suse.de>



On 14/09/2017 05:04, Andreas Schwab wrote:
> On Sep 11 2017, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
> 
>> I would prefer it to use INLINE_SYSCALL_CALL. And since the idea is not to
>> clobber errno I think we can do:
>>
>> #ifdef __NR_execvat
>>   INTERNAL_SYSCALL_DECL (err);
>>   int val = INTERNAL_SYSCALL_CALL (execveat, fd, argv, envp, AT_EMPTY_PATH);
>>   if (INTERNAL_SYSCALL_ERROR_P (val, err) != ENOSYS)
>>     return -1;
>> #endif
> 
> No, that would be wrong.  Either the exec succeeds, then errno no longer
> exits, otherwise errno needs to be set before we return.
> 
> Andreas.
> 

Right, errno does need to be setup (I misread the man for some reason).

      reply	other threads:[~2017-09-14 13:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  9:06 [PATCH] " Andreas Schwab
2017-09-07 11:27 ` Florian Weimer
2017-09-11 10:23   ` [PATCH v2] " Andreas Schwab
2017-09-11 20:30     ` Adhemerval Zanella
2017-09-11 20:38       ` Joseph Myers
2017-09-11 20:59         ` Florian Weimer
2017-09-11 22:58           ` Adhemerval Zanella
2017-09-14  8:05       ` Andreas Schwab
2017-09-14 13:44         ` Adhemerval Zanella [this message]

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=a609bbfb-3670-19ad-b012-f829b7afb0be@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /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).