This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: syscall wrappers policy (was re: glibc at the Toolchains microconference)
On 6/27/19 10:10 AM, Zack Weinberg wrote:
>> * Wrappers should be added … unless there is a clear reason not to
>
> I do not understand the rationale for these exceptions. Did you have
> specific cases in mind when you wrote these?
I think it was just a general escape hatch which is not needed.
If we find a really bad example then we'll have a public discussion about
it and can use consensus to change the rules.
Therefore the rules as written can be as strict as we agree to.
> (I’m particularly concerned that the “not quite a direct wrapper” rule
> would be used to argue against exposing a variant of `clone` that
> returns twice like `fork` does, which is a thing I think we should
> have. You probably _can_ do any fork-with-options operation with the
> `clone` wrapper we have, but having to separate the child-side code to
> its own function and allocate stack space for it can be a serious obstacle.)
Updated. Please review.
https://sourceware.org/glibc/wiki/Consensus#WIP:_Kernel_syscalls_wrappers
--
Cheers,
Carlos.