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-File11.5.9.2 Shutdown in MagiC TOS Under MagiC the Shutdown works a follows: all running programs receive an AP_TERM message signalling that they should terminate themselves. If there are still programs in memory after a certain time, then SHUTDOWN outputs an error-message. In the file SHUTDOWN.INF one can specify program names (without a suffix such as '.prg' or '.app') that are uncritical and should not lead to an error-message from SHUTDOWN. In addition to this the following points have to be heeded: . If [Control]-[Alternate]-[Delete] is to be used to terminate the system, one must ensure that the screen is not locked, i.e. that a program is not currently processing a dialog box or alert on the screen, for instance. Furthermore a suitable shell (such as MAGXDESK, Thing or Jinnee) must have been loaded, i.e. no program may be loaded in 'single-mode' or in the 'Shell not resident' mode (say with [Alternate]-double-click). . f the screen is locked, then only the writeback-demon will be terminated, i.e. the cache written back. Only after the screen is released (i.e. after closing of the dialog or alert box) can the Shutdown be performed. . Should the system have crashed in such a way that no Shutdown is possible any more, then [Control]-[Alternate]-[Delete] should be performed for a second time; a warm start will be carried out without programs being terminated . If 'single-mode' is active or the shell is not loaded, then again only the writeback-demon will be terminated and the cache written back. For a complete Shutdown the running program has to be terminated so that the shell is active again. The Shutdown then must be performed via the 'File/Shutdown' menu entry. In MagiC 4, the Shutdown mechanism was revised as follow: The AES now sends a SHUT_COMPLETED message with buf[3] = 0 (i.e. 'Shutdown terminated unsuccessfully') and buf[4] = -1 (invalid ap_id) if there are still programs running in the system that do not understand AP_TERM explicitly. With that, a program that only masters the MultiTOS specification will break off the Shutdown. SHUTDOWN.PRG, on the other hand, was adapted to the new specification, and functions as previously, i.e. gives all programs still running a timeout and then outputs the names of all reluctant applications. In addition, the application #0 is no longer passed arbitrary data in buf[4,5,6,7] on [Control]-[Alternate]-[Delete], but the following message: buf[3] = -1 buf[4,6,7] = 0 buf[5] = AP_TERM See also: Shutdown in MultiTOS shel_write Shutdown at the receiver Shutdown at the initiator