- add IMPLEMENT_RANDOMIZE_STACK for ipcThread()
- log / print boost interprocess exceptions
- use MAX_URI_LENGTH in guiconstants.h (also used in qrcodedialog.cpp)
- remove unneeded includes and ipcShutdown() from qtipcserver.cpp
- fix a small mem-leak by deleting mq before re-using it
- make ipcThread() and ipcThread2() static functions
- add some more comments
#warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392
#endif
#include"ui_interface.h"
#include"qtipcserver.h"
#include"util.h"
usingnamespaceboost;
usingnamespaceboost::interprocess;
usingnamespaceboost::posix_time;
usingnamespaceboost;
usingnamespacestd;
staticvoidipcThread2(void*pArg);
#ifdef MAC_OSX
// URI handling not implemented on OSX yet
voidipcInit(){}
voidipcShutdown(){}
#else
voidipcShutdown()
staticvoidipcThread(void*pArg)
{
message_queue::remove(BITCOINURI_QUEUE_NAME);
IMPLEMENT_RANDOMIZE_STACK(ipcThread(pArg));
// Make this thread recognisable as the GUI-IPC thread
RenameThread("bitcoin-gui-ipc");
try
{
ipcThread2(pArg);
}
catch(std::exception&e){
PrintExceptionContinue(&e,"ipcThread()");
}catch(...){
PrintExceptionContinue(NULL,"ipcThread()");
}
printf("ipcThread exited\n");
}
voidipcThread(void*parg)
staticvoidipcThread2(void*pArg)
{
// Make this thread recognisable as the GUI-IPC thread