• 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: CFSocket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocket


  • Subject: Re: CFSocket
  • From: Steve Sisak <email@hidden>
  • Date: Fri, 23 Nov 2007 09:11:08 -0500

At 4:38 PM +0530 11/23/07, sunil prajapati wrote:
Problem comes when I use  RunApplicationEventLoop(); at the end of
main function and launch my unix executable  from "StartupItems" and
then logout the user ,my unix executable  get quit after logout and
when i use while(1) then it does not quit. Even when I use Carbon API
"InstallEventLoopTimer" to create timer then also after logout my unix
executable get quit.
The  Carbon API "SendAppleEventToSystemProcess" which is I m using for
restart(kAERestart),shutdown(kAEShutDown),logout (kAEReallyLogOut) the
system does not work.

I don't why all those things are happening when I launch my unix
executable from  "StartupItems" ?

You're using the wrong APIs -- you can't use the Carbon API from a daemon that doesn't have a graphical context -- you need to use CoreFoundation.


Look at CFRunLoopRun() and CFRunLoopTimer() which are nearly identical to the calls you're using.

Now for the bad news -- you can't use the AppleEvent APIs from a daemon.

HTH,

-Steve
_______________________________________________
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


References: 
 >CFSocket (From: "sunil prajapati" <email@hidden>)
 >Re: CFSocket (From: "sunil prajapati" <email@hidden>)

  • Prev by Date: Re: CFSocket
  • Next by Date: BSD Socket
  • Previous by thread: Re: CFSocket
  • Next by thread: Airport Framework / API
  • Index(es):
    • Date
    • Thread