[comp.sys.mac.programmer] Shutdown & ReStart from MPW C

payne@unocss.UUCP (Matt Payne) (08/25/89)

It would really be nice to shutdown the MAC II from within an application.
Likewise, it would be nice to restart from within an applicaton.

Clues, pointers, suggestions, etc are gratefully accepted!

p.s. Thanks for the clues on Resources!
p.p.s. Still looking for source code archives accessible via ftp....


-- 
Matt Payne
Internet:conslt10@zeus.unl.edu  UUCP:uunet!btni!unocss!payne 
Bitnet:CONSLT10@UNOMA1

thecloud@dhw68k.cts.com (Ken McLeod) (08/27/89)

In article <1499@unocss.UUCP> payne@unocss.UUCP (Matt Payne) writes:
>
>It would really be nice to shutdown the MAC II from within an application.

 Why??? Unless you're writing a Finder substitute, I can't think of any
good reason for doing this. Shutting down the machine should always be
completely under the user's control; if it occurs in an unexpected place
or at an unexpected time, confusion and frustration results.

 The routines for shutting off the Mac from software are given in the
Shutdown Manager chapter of Inside Macintosh vol.5. A quote from that
chapter:

 "Warning: ShutDwnPower and ShutDwnStart are used by the Finder and other
  system software; your application should have no need to call these
  two routines."

 I've personally been 'burned' by a few applications and HyperCard stacks
where what passed for a "Quit" button actually did a "Quit and Shutdown".
This is not friendly behavior.

-- 
==========     .......     =============================================
Ken McLeod    :.     .:    UUCP: ...{spsd,zardoz,felix}!dhw68k!thecloud
==========   :::.. ..:::   INTERNET: thecloud@dhw68k.cts.com
                ////       =============================================

hoffman@ux1.cso.uiuc.edu (08/28/89)

Check out the Shutdown Manager chapter in IM IV or V.  I can't remember
which.

Steve
	___________________________________________________________________
	|    Steve M. Hoffman    |    email: hoffman@ux1.cso.uiuc.edu     |
	| University of Illinois | internet: hoffman%ux1@uxc.cso.uiuc.edu |
	|    Champaign/Urbana    |     uucp: uunet!uiucuxc!ux1!hoffman    |
	|________________________|   usmail: 515 Bach Ct. #24             |
	| I haven't a clue what  |           Champaign, IL 61820          |
	|     I'm doing here     |           (217)/359-7448               |
        |________________________|________________________________________|

ge@kunivv1.sci.kun.nl (Ge' Weijers) (08/30/89)

In article <25949@dhw68k.cts.com> thecloud@dhw68k.cts.com (Ken McLeod) writes:
>In article <1499@unocss.UUCP> payne@unocss.UUCP (Matt Payne) writes:
>>
>>It would really be nice to shutdown the MAC II from within an application.
>
> Why??? Unless you're writing a Finder substitute, I can't think of any
>good reason for doing this. Shutting down the machine should always be
>completely under the user's control; if it occurs in an unexpected place
>or at an unexpected time, confusion and frustration results.

It is very useful in a tape backup program. Start the backup & go home.
After the backup is finished, the system powers down (except for the
tape drive, which can stand being switched on better than a monitor).

IT SHOULD BE OPTIONAL, of course, and not default behaviour either.
Shutting down is then still under user control, but delayed.

Ge' Weijers
Ge' Weijers                                    Internet/UUCP: ge@cs.kun.nl
Faculty of Mathematics and Computer Science,   (uunet.uu.net!cs.kun.nl!ge)
University of Nijmegen, Toernooiveld 1         
6525 ED Nijmegen, the Netherlands              tel. +3180612483 (UTC-2)