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: killing background processes with UNIX in cocoa?



On 31 Jan 2008, at 06:44, Nathaniel Gottlieb-Graham wrote:

I'm probably being really stupid here, how in Cocoa do you run UNIX commands?

You use NSTask to run UNIX commands, but you would use an NSTask to kill processes. (BTW, *PLEASE* put *all* of your question in the body of your e-mail, even if some of it is a repeat of your subject line; don't put half in the subject line and half in the message, because sometimes people won't see all of it.)


You're probably looking for the UNIX kill() function, though you shouldn't use that on GUI applications (instead, send them a quit Apple Event---see <http://www.cocoabuilder.com/archive/message/cocoa/2005/12/10/152304 > for an example).

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

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

This email sent to email@hidden
References: 
 >killing background processes with UNIX in cocoa? (From: Nathaniel Gottlieb-Graham <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.