• 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: Cocoa/Obj-C Restart Computer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa/Obj-C Restart Computer


  • Subject: Re: Cocoa/Obj-C Restart Computer
  • From: Frederick Cheung <email@hidden>
  • Date: Sat, 31 Jul 2004 00:38:43 +0200

On 31 Jul 2004, at 00:25, Nick Zitzmann wrote:

On Jul 30, 2004, at 4:02 PM, Shalev NessAiver wrote:

Hmmm, well the terminal command: "shutdown -r now" will do that. All you need to do is call that from Objective-C. I don't remember how to call terminal commands off the top of my head, but worst comes to worst you can stick it in an applescript.

I wouldn't recommend running that from a GUI application, though, because "shutdown -r now" causes an (almost) immediate reboot and doesn't gracefully quit every running GUI application first. If you make a program run that, and at least one of your program's users had unsaved work in the background at the time, then you'll end up with at least one very angry user...

It also has the inconvenience that you need to run it as the superuser.

Fred.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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.
_______________________________________________
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: 
 >Cocoa/Obj-C Restart Computer (From: Matt Jaffa <email@hidden>)
 >Re: Cocoa/Obj-C Restart Computer (From: Shalev NessAiver <email@hidden>)
 >Re: Cocoa/Obj-C Restart Computer (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: DVDPlayback.framework will not initialize under debugger
  • Next by Date: Re: Binding NSTableColumn.textColor to Two Things;
  • Previous by thread: Re: Cocoa/Obj-C Restart Computer
  • Next by thread: Re: Cocoa/Obj-C Restart Computer
  • Index(es):
    • Date
    • Thread