public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Xiao Yang <ice_yangxiao@163.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4] syscalls/pidfd_open01.c: Add check for close-on-exec flag
Date: Mon, 20 Jul 2020 19:24:54 +0800	[thread overview]
Message-ID: <19b160e1-be12-bb32-a2cd-1c2be24428cb@163.com> (raw)
In-Reply-To: <20200720085311.h77zxzfsqrhmmy2w@vireshk-mac-ubuntu>

Hi Petr, Viresh

Thanks a lot for your review, pushed. :-)

Thanks,

Xiao Yang

On 7/20/20 4:53 PM, Viresh Kumar wrote:
> On 20-07-20, 13:27, Xiao Yang wrote:
>> pidfd_open(2) will set close-on-exec flag on the file descriptor as
>> it manpage states, so check close-on-exec flag by fcntl(2).
>>
>> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
>> ---
>>
>> 1) We don't care if the test uses the TEST() macro so just keep it.
>> 2) Use bare fcntl() instead of SAFE_FCNTL() so that file descriptor
>>     can be closed when fcntl(F_GETFD) fails.
>>
>>   .../kernel/syscalls/pidfd_open/pidfd_open01.c  | 18 ++++++++++++++++--
>>   1 file changed, 16 insertions(+), 2 deletions(-)
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>


      reply	other threads:[~2020-07-20 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  5:27 [LTP] [PATCH v4] syscalls/pidfd_open01.c: Add check for close-on-exec flag Xiao Yang
2020-07-20  7:07 ` Petr Vorel
2020-07-20  8:53 ` Viresh Kumar
2020-07-20 11:24   ` Xiao Yang [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=19b160e1-be12-bb32-a2cd-1c2be24428cb@163.com \
    --to=ice_yangxiao@163.com \
    --cc=ltp@lists.linux.it \
    /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