Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background if Login Item launched



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Background if Login Item launched (From: Bill Patterson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.