Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.15.3 Shutdown TOS Name: »Shutdown« - Kill all processes, sync file-systems then halt or reboot the system. Opcode: 337 (0x0151) Syntax: void Shutdown ( int32_t mode ); Description: The function Shutdown kills all processes, syncs file- systems then halts or reboots the system. On mode equal to SHUT_HALT (0L), the system will shut down, then enter a halted condition. On mode equal to SHUT_BOOT (1L), the system will reboot the machine after shutting everything down. On mode equal to SHUT_COLD (2L), the system will act the same as with the SHUT_BOOT mode, except that a cold start rather than the warm start will be performed. SHUT_COLD mode is recognized as of FreeMiNT version 1.15.5; older versions of the kernel will treat the SHUT_COLD mode as SHUT_BOOT. On mode equal to SHUT_POWER (3L), the system will turn the power off. The only hardware that supports it at present is CT60. If the hardware does not support it, SHUT_HALT will be performed. SHUT_POWER mode is recognized as of FreeMiNT version 1.16a; older versions of the kernel will treat the SHUT_POWER mode as SHUT_COLD. All other values of mode are reserved for future definition. Older versions of MiNT contained a bug that might cause the system to crash if you called Shutdown while both GEM AES and virtual console daemon were present. You need root privileges to shut the system down. Return value: Returns a negative GEMDOS error-code if it fails. On success this call obviously never returns. Availability: As of the first in MultiTOS integrated MiNT version 1.04. Group: System functions See also: Binding Sync