Re: hang in CFStream code
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.