dbus must be compiled with -D_REENTRANT option to make errno thread-safety

Pavel Strashkin pavel.strashkin at gmail.com
Thu Nov 25 11:58:23 PST 2010


Hi all,

Few days ago i wrote my own authentication mechanism which uses local
files. To open these files i use standard "open" function and if it
fails i verify some specific error codes using "errno" variable. Also
i have Python client which is multi-threaded and uses signals so i
also need dbus main loop. Under heavy-load (or not heavy), when "open"
call fails (it's ok), i'm checking for "errno" value and...bah! At the
call time it was ENOENT value, but right after call it is equal to
EAGAIN (propogates from another thread where main dbus loop working
with select/poll). To fix that issue and make errno thread-safety you
must compile dbus with -D_REENTRANT option (CFLAGS). When i recompiled
dbus with this flag, i never got any issues.

P.S. sorry for my English :)


More information about the dbus mailing list