Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: TMTasks and Procptrs?? Message-ID: <32964@ucbvax.BERKELEY.EDU> Date: 3 Dec 89 04:14:16 GMT References: <1506@sequent.cs.qmc.ac.uk> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 27 In article <1506@sequent.cs.qmc.ac.uk> davide@cs.qmc.ac.uk (David Edmondson) writes: >Could some kind soul point me in the right direction before I >eat this keyboard. If you are running A/UX you don't want to look in Inside Mac. Vol2, you need Inside Mac Vol 5. The StartUp Manager chapter has info on writing INITs, the ShutDown Manager chapter has info on restarting your Mac. Don't put the INIT above bufPtr, do set its System Heap & Locked bits. Do a DetachResource at INIT time, so the init runner won't dispose of you. Don't use a VBL task, since it might not be possible to do a restart at interrupt time. (Suppose the file system were busy.) I would override the SystemTask trap so I'd guarantee the system being in a good state for a ReStart. Every five minutes, I'd do a Sec2Date call, so my INIT would get the benefit of any daylight savings time corrections the user made. I'd compute the five minutes by comparing Seconds with a local variable holding (my last call to Seconds + 60*5). If it was not time to call the ShutDown manager to do a restart, I'd just jump to the old SystemTask call. (Making this whole thing a legal "head patch".) WaitNextEvent() calls SystemTask. > The mac is a detour in the inevitable march of mediocre computers. > drs@bnlux0.bnl.gov (David R. Stampf) --- David Phillip Oster -master of the ad hoc odd hack. Arpa: oster@dewey.soe.berkeley.edu Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu