This is the mail archive of the libc-help@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: What is GLibc's policy on what is safe to use after a fork from a multithreaded program?


On 08/29/2014 09:00 PM, Carlos O'Donell wrote:
setgroups - complex, AS-unsafe

This could be made safe after fork with little effort because the thread count is 1 at this point, and the setxid magic isn't needed.

cap_set_proc - unknown

This function just calls capset, which is just a system call wrapper. It affects thread attributes in a potentially irrevocable way (just as the setgroups or setresuid system calls), so calling it async-signal-safe is a bit of a stretch, but it's safe after fork.

--
Florian Weimer / Red Hat Product Security


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