• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
errno global vx. errno pthread...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: errno global vx. errno pthread...
      • From: Patrick Rutkowski <email@hidden>
  • Prev by Date: Re: launchd and programmatic access
  • Next by Date: Re: launchd and programmatic access
  • Previous by thread: Re: launchd and programmatic access
  • Next by thread: Re: errno global vx. errno pthread...
  • Index(es):
    • Date
    • Thread