• 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: Background if Login Item launched
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background if Login Item launched


  • Subject: Re: Background if Login Item launched
  • From: Joseph Kelly <email@hidden>
  • Date: Thu, 29 Sep 2005 15:13:03 -0700

You can use getppid() to get your parent process id, and compare this to the various things you get from kvm_getprocs(). The hope is that processes forked by Login Items would have a different parent than those forked by Finder and the Dock. I don't know for sure, but at least it's a place to start.

joe

On Sep 29, 2005, at 12:02 PM, Bill Patterson wrote:

I have an application that normally is launched as a Login Item, but the first time, it is launched by the user. I need to detect which method is used, and suppress the application from becoming the active application if launched as a Login Item.

How can I detect if the application is launched via the Login Items?

How can I force the application to remain in the background after it is launched, even if it is the last or only Login Item?

Bill Patterson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Background if Login Item launched (From: Bill Patterson <email@hidden>)

  • Prev by Date: Re: NSError and user-cancel induced "errors"
  • Next by Date: Re: NSError and user-cancel induced "errors"
  • Previous by thread: Re: Background if Login Item launched
  • Next by thread: Re: Background if Login Item launched
  • Index(es):
    • Date
    • Thread