News for hackers. Stuff that matters.
Re:Linux Namespaces and Go Don't Mix by cyphar on Saturday June 03, 2017 @04:40AM (#14475545)
On paper, all code between a fork and exec (in a multithreaded process) must be async-signal safe as well. I'm not sure if this is also true for the callbacks with pthread_atfork (I've personally never used it), but it's something to keep in mind.
Re:Linux Namespaces and Go Don't Mix by klodolph on Sunday June 04, 2017 @09:51PM (#14484813)
There’s a defect report somewhere about this exact topic—there’s no requirement that pthread_atfork handlers are async-signal-safe, but fork is marked as async-signal-safe. The question is whether the documentation should be fixed, whether atfork handlers should just not run if fork is called in a signal handler, etc. IMO if someone’s forking in a signal handler in a multithreaded program nothing good is going to happen anyway.