• R
    remove explicit locking to prevent __synccall setuid during posix_spawn · a0473a0c
    Rich Felker 提交于
    for the duration of the vm-sharing clone used by posix_spawn, all
    signals are blocked in the parent process, including
    implementation-internal signals. since __synccall cannot do anything
    until successfully signaling all threads, the fact that signals are
    blocked automatically yields the necessary safety.
    
    aside from debloating and general simplification, part of the
    motivation for removing the explicit lock is to simplify the
    synchronization logic of __synccall in hopes that it can be made
    async-signal-safe, which is needed to make setuid and setgid, which
    depend on __synccall, conform to the standard. whether this will be
    possible remains to be seen.
    a0473a0c
posix_spawn.c 4.4 KB