@@ -18,10 +18,12 @@ #define OF_THREAD_M #define _POSIX_TIMERS #define __NO_EXT_QNX #include "config.h" + +#include #include #include #include @@ -413,18 +415,26 @@ _running = OF_THREAD_RUNNING; if (!of_thread_new(&_thread, callMain, self, &_attr)) { [self release]; - @throw [OFThreadStartFailedException exceptionWithThread: self]; + @throw [OFThreadStartFailedException + exceptionWithThread: self + errNo: errno]; } } - (id)join { - if (_running == OF_THREAD_NOT_RUNNING || !of_thread_join(_thread)) - @throw [OFThreadJoinFailedException exceptionWithThread: self]; + if (_running == OF_THREAD_NOT_RUNNING) + @throw [OFThreadJoinFailedException + exceptionWithThread: self + errNo: EINVAL]; + + if (!of_thread_join(_thread)) + @throw [OFThreadJoinFailedException exceptionWithThread: self + errNo: errno]; _running = OF_THREAD_NOT_RUNNING; return _returnValue; }