• 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
Re: hang in CFStream code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hang in CFStream code


  • Subject: Re: hang in CFStream code
  • From: James Matthews <email@hidden>
  • Date: Wed, 30 Apr 2003 15:50:22 -0400

At 1:08 PM -0400 4/30/03, James Matthews wrote:
I was disposing of the CFReadStream and socket in my kCFStreamEventEndEncountered callback, but it turns out that the CFStream code was trying to lock its (now non-existent) data structure after the callback returned.

To correct my own post, the problem wasn't that I was disposing of the CFReadStream but that I was calling fork() from the callback.

Which raises another question: what are the potential problems with using fork()/exec() in a program with CFStreams attached to sockets? It turns out that my workaround -- postponing the actions of my CFReadStream callback using a timer -- does not work, and I still end up with a hang on a CFStream data structure after two fork()/exec()s. I can post the program source (1 file, about 400 lines) if that would help.

Thanks,
--
Jim Matthews
Fetch Softworks
http://fetchsoftworks.com
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >hang in CFStream code (From: James Matthews <email@hidden>)
 >Re: hang in CFStream code (From: Becky Willrich <email@hidden>)
 >Re: hang in CFStream code (From: James Matthews <email@hidden>)

  • Prev by Date: Re: Forcing PAP on OSX
  • Next by Date: Re: Getting own IP address
  • Previous by thread: Re: hang in CFStream code
  • Next by thread: Forcing PAP on OSX
  • Index(es):
    • Date
    • Thread