From: Andreas Schwab <schwab@suse.de>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2] Use execveat syscall in fexecve
Date: Thu, 14 Sep 2017 08:05:00 -0000 [thread overview]
Message-ID: <mvm1sn9aepa.fsf@suse.de> (raw)
In-Reply-To: <2a21b0d6-5f62-a711-2b4a-616ebb798963@linaro.org> (Adhemerval Zanella's message of "Mon, 11 Sep 2017 17:29:42 -0300")
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.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2017-09-14 8:05 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 [this message]
2017-09-14 13:44 ` Adhemerval Zanella
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=mvm1sn9aepa.fsf@suse.de \
--to=schwab@suse.de \
--cc=adhemerval.zanella@linaro.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).