• 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: Terminate Process By Name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminate Process By Name


  • Subject: Re: Terminate Process By Name
  • From: David Reed <email@hidden>
  • Date: Mon, 2 Aug 2004 18:40:20 -0400

I want to be able to terminate a
process that belongs to the user that i know the name
of.

I'm assuming you mean the name of the process... you can kill a process by name from the command line with the killall(1) command, but this doesn't do it very cleanly.

Programmatically, you could iterate through the process list with GetNextProcess(), check the names with CopyProcessName(), and send a quit AppleEvent to any matches. This lets the app deal with unsaved files and exit gracefully.

HTH,
David.

--
David Reed | email@hidden | AIM/iChat: parmadil01
_______________________________________________
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.


References: 
 >Terminate Process By Name (From: Kodex <email@hidden>)

  • Prev by Date: [SOLVED]Re: NSPasteboard in Carbon App
  • Next by Date: Re: Files in Application Support
  • Previous by thread: Terminate Process By Name
  • Next by thread: Files in Application Support
  • Index(es):
    • Date
    • Thread