SourceForge has been redesigned. Learn more.
Close

#227 PosixThread::PosixThread(bool isMain) ctor

open
nobody
5
2012-11-20
2009-01-06
Yoga
No

I am wondering why there is no PosixThread::PosixThread(bool isMain) ctor. I need to have a signal handler for the main thread. If I modified/set the signal handling in main(), it also affects the signal handling in child threads. And since cc++ signal handler only passes the signal to PosixThread class, I am stuck.

Right now, I modified the thread.cpp and add the following ctor:

PosixThread::PosixThread(bool isMain):
Thread(isMain) {
SysTime::getTime(&_alarm);
}

Or is there any other way of creating a PosixThread class for the main thread?

Discussion


Log in to post a comment.