CFMessagePortCreateRemote fails, only in .app, on PowerPC 10.5
CFMessagePortCreateRemote fails, only in .app, on PowerPC 10.5
- Subject: CFMessagePortCreateRemote fails, only in .app, on PowerPC 10.5
- From: Jerry Krinock <email@hidden>
- Date: Sat, 03 Sep 2011 07:39:05 -0700
I just discovered a weird problem with CFMessagePort on a PowerPC Mac running Mac OS X 10.5.
My app needs IPC with my Firefox extension. Firefox is running, my extension is loaded and it is exposing a port named "com.mycompany.MyApp.ToFirefox". I know it's working because I have compiled a command-line tool which executes this code:
CFMessagePortRef remotePort = CFMessagePortCreateRemote(
NULL,
(CFStringRef)portName
) ;
When I execute this in the command line tool, it succeeds. When I execute this in my app, it returns NULL.
I added some 30-second sleeps to my app and tested it this way:
• App launches
• App sleeps 30 seconds
• While sleeping, launch the command-line tool
• Tool runs CFMessagePortCreateRemote. Result: succeeds
• App awakens
• App executes CFMessagePortCreateRemote. Result: fails
• App sleeps 30 seconds again
• While sleeping, launch the command-line tool
• Tool runs CFMessagePortCreateRemote. Result: succeeds
Were there any bugs in Mac OS X 10.5 that would explain this?
Thanks,
Jerry Krinock _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden