errno global vx. errno pthread...
errno global vx. errno pthread...
- Subject: errno global vx. errno pthread...
- From: "Michael Andronov" <email@hidden>
- Date: Fri, 3 Oct 2008 18:56:27 -0400
Hi,
I am presently debugging an application, which has 2 threads:
1. First thread - TH1 - is waiting to be waked up within the function sem_wait(...)
2. Second thread - TH2 - is executing some code. Within such code, there is a call for fsync(...) function.
The behavior is that if fsync() function within TH2 is failing, then TH1 is returning form sem_wait(...) with errno EBADF ( int 9).
The only explanation I see is that for some reason global errno is checked within TH1 instead of thread local.
The code , in C++, is compiled with `-pthread` flag, under OS X 10.5...
My question is how to distinguish errno (global) from errno ( thread local) on OS X 10.5 Leopard?
Thanks for kind attention to this matter.
Michael.
P.S> I have seen same posting about similar issue dated 2002, but the `fixes` seems not working on 10.5...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden