This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] posix: New function posix_spawn_file_actions_addchdir_np [BZ #17405]
- From: Rich Felker <dalias at libc dot org>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Wed, 31 Oct 2018 23:03:57 -0400
- Subject: Re: [PATCH] posix: New function posix_spawn_file_actions_addchdir_np [BZ #17405]
- References: <87zhv0g5t3.fsf@oldenburg.str.redhat.com> <faee556b-4274-318a-9b2b-1618f815f8fe@redhat.com> <87ftwooue2.fsf@oldenburg.str.redhat.com> <2ee55960-100c-ca37-1b5a-2b572054d113@redhat.com>
On Wed, Oct 31, 2018 at 10:03:26PM -0400, Carlos O'Donell wrote:
> On 10/30/18 1:50 AM, Florian Weimer wrote:
> > * Carlos O'Donell:
> >
> >> On 10/26/18 10:07 AM, Florian Weimer wrote:
> >>> I'm not adding documentation in this patch because none exists for the
> >>> posix_spawn functionality.
> >>
> >> We can do better though, I'm happy even if we just add the prototypes
> >> into the manual to give others a place to hang more text in the future.
> >> The safety notes would be helpful too, is it MT-safe, AS-safe etc.
> >>
> >> Would you please take a stab at adding something minimal?
> >
> > I don't want to make *any* changes to the manual at this point, sorry.
>
> Thanks. I appreciate the direct answer. I will try to take a stab at
> some initial documentation for posix_spawn and posix_spawnp so that
> we have somewhere to hang future changes.
>
> For example:
>
> diff --git a/manual/process.texi b/manual/process.texi
> index b82b91f9f1..efa0bb8b14 100644
> --- a/manual/process.texi
> +++ b/manual/process.texi
> @@ -34,6 +34,7 @@ primitive functions to do each step individually instead.
> * Process Identification:: How to get the process ID of a process.
> * Creating a Process:: How to fork a child process.
> * Executing a File:: How to make a process execute another program.
> +* POSIX Spawn:: Combining fork and exec into spawn.
Maybe it can't be helped, but I feel like this misrepresents and
de-motivates posix_spawn. Perhaps instead something like "Execute
another program as a child process without the need to fork".
Rich