Re: stopping an application
Re: stopping an application
- Subject: Re: stopping an application
- From: Andrew Farmer <email@hidden>
- Date: Mon, 13 Apr 2009 00:47:30 -0700
On 12 Apr 09, at 23:55, Arjun SM wrote:
Use the 'do shell script' command
do shell script kill -9 PID
That should work.
No, actually, don't do that.
We are discussing Cocoa programming here. Running an Applescript that
executes a shell script command that wraps a system call is an
incredibly inefficient approach to the problem. (The correct way to do
this would be using the kill() syscall... but keep reading.)
In any case, that's a terrible way to quit an application. If the
application has any files open, it'll quit without getting a chance to
save them properly - in particular, it won't prompt the user to save
changes, which is a really fast path to making the user angry at your
program.
_______________________________________________
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