trickle
trickle copied to clipboard
Make trickle multithread version signal safe
Because, select(),poll(), read(), write() and many other overloaded functions are normally reentrant from signal handlers, we need to block all signals while we hold mutex or else we can deadlock.
Modified Makefile.am because while make did not build libtrickle.so, 'make install' was trying to install it. I'm really shooting in the dark for autoconf problem so maybe it is not the best way to resolve the problem.
There is still some rework to do.
oset should be private to every thread. thread B could overwrite oset while thread A has the mutex.
I have been using this patch for over a month with the bitcoin client and trickle has never been that stable.
I am 100% confident that this patch is ok.