Re: Terminate Process By Name
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.