On Tue, 11 Nov 2014, H.J. Lu wrote:

> Currently mpx-runtime uses
> 
> dlsym(RTLD_NEXT, "sigaction");
> 
> to get the original sigaction in liibc.so.  Glibc does provides __sigaction
> for the original sigaction.  But dlsym(RTLD_NEXT, is more portable.

I guess there's a question of what the portability targets for this code 
are.  E.g. setting O_CLOEXEC when opening files (not later with fcntl 
FD_CLOEXEC if there might be other threads running at the time) is good 
practice for writing libraries - but while O_CLOEXEC is in current POSIX, 
setting it from fopen with the "e" flag is a GNU extension.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to