• 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: Quitting all active applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quitting all active applications


  • Subject: Re: Quitting all active applications
  • From: Marcus <email@hidden>
  • Date: Thu, 28 Aug 2008 13:13:10 +0200


28 aug 2008 kl. 12.36 skrev Phil Faber:

Is there a simple way to quit all running applications?

Basically I want to achieve the same result as the first stage of hitting 'shut down' (closing all applications) without actually shutting down the system.

Take a look at the NSWorkspace class. The launchedApplications: method will give you an array of running applications including their process id. A simple solution would be to use NSTask to invoke the kill command on each of them. Just remember to remove you application from the array or it will be killed as well.


By the way, in what situation do you want to kill all running applications?

Marcus


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Quitting all active applications (From: Phil Faber <email@hidden>)

  • Prev by Date: Seeking UI designer
  • Next by Date: Re: global key bindings
  • Previous by thread: Re: Quitting all active applications
  • Next by thread: [meeting] Swindon, UK: upcoming cocoaheads
  • Index(es):
    • Date
    • Thread