Re:The getrandom(2) system call was requested by the LibreSS...
by IgorPartola on Thursday July 17, 2014 @08:12PM
(#8050986)
Would it be possible to do something a bit more modern-feeling such as register a callback address that gets executed on fork?
[ Parent
| on HN ]
Re:The getrandom(2) system call was requested by the LibreSS...
by TheLoneWolfling on Thursday July 17, 2014 @08:14PM
(#8050999)
Just don't fork in that callback... Or call anything that potentially forks.
Re:The getrandom(2) system call was requested by the LibreSS...
by JoshTriplett on Thursday July 17, 2014 @08:56PM
(#8051141)
If you can count on pthreads, you can use pthread_atfork for that.
Re:The getrandom(2) system call was requested by the LibreSS...
by taejo on Friday July 18, 2014 @04:56AM
(#8052197)
The problem with that is that a library can't count on pthreads: the application might call clone directly, without going through the libc wrapper, which calls the atfork callbacks.
Re:The getrandom(2) system call was requested by the LibreSS...
by JoshTriplett on Friday July 18, 2014 @12:23PM
(#8053871)
Very good point; pthread_atfork does not suffice. Thanks for the correction.