[omniORB] linux/gdb and multithreading
bjornw@fairplay.no
bjornw@fairplay.no
18 Nov 1998 14:02:57 +0100
Hi there!
I'm having problem debugging my multithreaded orb using RedHat-5.1 (and R=
edHat 5.2).
My debugger supports multi-threading (gdb-4.17.0.4 from RedHat).
Here is whats happening:
In the file src/lib/omnithread/posix.cc, in the function timedwait I get
a EINTR from pthread_cond_timedwait(), and this leads to omniorb throwing
an exception.
The question is: why do I get an EINTR? And why does this only happen fro=
m
within the debugger? My programs runs fine without the debugger.=20
int
omni_condition::timedwait(unsigned long secs, unsigned long nanosecs)
{
timespec rqts =3D { secs, nanosecs };
int rc =3D ERRNO(pthread_cond_timedwait(&posix_cond,
&mutex->posix_mutex, &rqts));
if (rc =3D=3D 0)
return 1;
#if (PthreadDraftVersion <=3D 6)
if (rc =3D=3D EAGAIN)
return 0;
#endif
if (rc =3D=3D ETIMEDOUT)
return 0;
throw omni_thread_fatal(rc);
}
bjornw>
-------------------------------------------------------
Bj=F8rn Wennberg email: bjornw@fairplay.no=20
ms: +47 950 82 657
Senior Programmer phone: +47 22405538
FairPlay International AS fax: +47 22405539