Re: Shutdown/Restart computer
Re: Shutdown/Restart computer
- Subject: Re: Shutdown/Restart computer
- From: vinai <email@hidden>
- Date: Mon, 14 Sep 2009 18:14:19 -0700 (PDT)
A call to the system command, like:
system ("sudo /sbin/shutdown -h now');
You'd have to make sure your user is authenticated to use shutdown via sudo ...
I'm not sure if there's a cleaner way specific to OS X. The above should work a reasonable portion of UNIX and UNIX-type systems.
vinai
--- On Mon, 9/14/09, PCWiz <email@hidden> wrote:
> How would I shut down and restart the computer using Objective-C code?
>
> Thanks
_______________________________________________
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