Communication with StartupItem
Communication with StartupItem
- Subject: Communication with StartupItem
- From: Frank Fenn <email@hidden>
- Date: Mon, 10 Feb 2003 23:44:36 -0700
Hi all,
I'm getting crazy about this. After hours of testing, debugging, and
research I still don't get it.
I have a foundation tool in /Library/StartupItems and a PreferencesPane
wich controls the tool.
The startupitem has a normal runloop and does some timer actions every
5 minutes. At the
beginning it reads a data file, so far so good.
The preferences panel should send 3 possible actions to the tool,
pause, resume, and reload
data file.
Version a) CFNotificationCenterAddObserver() in the tool,
CFNotificationCenterPostNotification
in the preferences.
This doesn't work after the systems boots up, no notification is
received by the tool. If I use
"./thetool" or "sudo SystemStarter start thetool" from the
terminal, it just works, even after
logout, login
Version b) CFMessagePortCreateLocal(),
CFMessagePortCreateRunLoopSource()
This works fine after the machine starts up the first time, the
messages are received by my
startup item tool.
After a login, logout the tool is gone, crash in
CFMessagePortCreateRunLoopSource()
Does SystemStarter terminate and restart all items in case of a
logout/login? How can I securely
communicate with my tool? After 10 hours of trial and error I've no
ideas left. Please help, if possible
with some source code.
--
regards
Frank Fenn - Bright Light Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.