From: Andreas Schwab <schwab@suse.de>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Luca Boccassi <luca.boccassi@gmail.com>,
Florian Weimer <fweimer@redhat.com>,
Philip Withnall <bugzilla@tecnocode.co.uk>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH v3 3/3] linux: Add pidfd_getpid
Date: Tue, 16 May 2023 14:10:45 +0200 [thread overview]
Message-ID: <mvm353wjx2y.fsf@suse.de> (raw)
In-Reply-To: <20230516114612.159103-4-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Tue, 16 May 2023 08:46:12 -0300")
On Mai 16 2023, Adhemerval Zanella via Libc-alpha wrote:
> diff --git a/NEWS b/NEWS
> index aaecdc1c5b..7334bb49e9 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -47,6 +47,10 @@ Major new features:
> return a process ID, it returns a file descriptor that can be used along
> other pidfd functions.
>
> +* On Linux, the pidfd_getpid has been added. It allows to retrieve the
the pidfd_getpid function
> diff --git a/manual/process.texi b/manual/process.texi
> index 93e0ab5fb7..25417dce0d 100644
> --- a/manual/process.texi
> +++ b/manual/process.texi
> @@ -33,6 +33,7 @@ primitive functions to do each step individually instead.
> * Process Creation Concepts:: An overview of the hard way to do it.
> * Process Identification:: How to get the process ID of a process.
> * Creating a Process:: How to fork a child process.
> +* Querying a Process:: How to query a child process.
> * Executing a File:: How to make a process execute another program.
> * Process Completion:: How to tell when a child process has completed.
> * Process Completion Status:: How to interpret the status value
> @@ -389,6 +390,37 @@ Acts as @code{_Fork}, where it does not invoke any callbacks registered with
>
> This function is specific to Linux.
>
> +@node Querying a Process
> +@section Querying a Process
> +
> +The @code{pidfd_fork} function returned file descriptor can be used to query
> +for process extra information.
The file descriptor returned by the @code{pidfd_fork} function
> +@deftypefun pid_t pidfd_getpid (int @var{fd})
> +@standards{GNU, sys/pidfd.h}
> +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
> +
> +The @code{pidfd_getpid} retrieves the process ID associated with process file
The @code{pidfd_getpid} function
> +If the operation fails, @code{pidfd_getpid} return a value of @code{-1} and the
returns @code{-1}
--
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."
prev parent reply other threads:[~2023-05-16 12:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 11:46 [PATCH v3 0/3] Add pidfd_spawn, pidfd_spawnp, pidfd_fork, and pidfd_getpid Adhemerval Zanella
2023-05-16 11:46 ` [PATCH v3 1/3] posix: Add pidfd_spawn and pidfd_spawnp (BZ# 30349) Adhemerval Zanella
2023-05-16 11:58 ` Andreas Schwab
2023-05-16 11:46 ` [PATCH v3 2/3] posix: Add pidfd_fork Adhemerval Zanella
2023-05-16 11:46 ` [PATCH v3 3/3] linux: Add pidfd_getpid Adhemerval Zanella
2023-05-16 11:54 ` Luca Boccassi
2023-05-16 12:26 ` Adhemerval Zanella Netto
2023-05-16 12:38 ` Luca Boccassi
2023-05-16 12:55 ` Zack Weinberg
2023-05-16 13:05 ` Adhemerval Zanella Netto
2023-05-16 12:10 ` Andreas Schwab [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=mvm353wjx2y.fsf@suse.de \
--to=schwab@suse.de \
--cc=adhemerval.zanella@linaro.org \
--cc=bugzilla@tecnocode.co.uk \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=luca.boccassi@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).