This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 3/3] posix: Use posix_spawn on system



On 24/10/2018 07:40, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> Although POSIX does not require, glibc system implementation aims to be
>> thread and cancellation safe.  While reentracy handling does not require
>> any direct change of current strategy, cancellation requires a posix_spawn
>> to be cancellable.
> 
> I don't think this is actually true.  My understanding is that
> posix_spawn does not block indefinitely in the parent, beyond things
> that are not cancellation points anyway (resource allocation).  I/O
> happens in the child process.  A posix_spawn that is a cancellation
> point will lead to marginally faster reaction to a cancellation request.
> But I think in practice, making the subsequent waitpid cancellable is
> sufficient, and it should help to reduce the size of the patch.

Indeed I think I overthought the cancellation handling requirements for
posix_spawn and I agree waitpid is suffice to handle system cancellation
(which is already a cancellable entrypoint). I will send an update version.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]