Exit the thread properly in the destructor of Monitor objects

This commit is contained in:
Paul Cercueil
2013-07-19 14:29:51 -04:00
parent d5280ebc7b
commit ebce540dfc
+2 -1
View File
@@ -91,6 +91,7 @@ Monitor::Monitor(std::string path, unsigned int flags) : path(path)
Monitor::~Monitor(void)
{
pthread_kill(thd, SIGINT);
pthread_cancel(thd);
pthread_join(thd, NULL);
}
#endif