tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fixing libpthread noload, another approach
Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:
> - programs linked without -lpthread that dlopen libpthread and then use
> threads will fail, with an error as cryptic as it is now: without
> appropriate logging, you do not know why it fails.
I thought about this: why can't we call openlog/syslog to make sure the
error makes it to the logs? Since the program is single-threaded and is
going to abort(), we are assured we will not disturb it, won't we?
Something like this:
void
_rtld_noload_stub(void) {
openlog(progname(), LOG_DAEMON, LOG_CONS|LOG_PERROR);
syslog(LOG_CRIT, "Symbol call for unloadable object");
abort();
}
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index