[comp.sys.atari.st] Quitting GEM. How is it done?

adamd@rhi.hi.is (Adam David) (03/15/91)

Sometimes it is difficult to avoid having to run GEM programs. I would like to
be able to junk GEM during a session without having to reboot, so that the
memory can be used for something else. It is fairly easy to stop GEM and get on
with something else in the underlying shell (just send KILL -17 to it), but my
attempts to quit GEM result in a system crash shortly afterwards. Indeed the
MiNT docs warn against killing GEM dead, but it should be possible if the right
precautions are taken. What is necessary to do first so that GEM can be
successfully removed without trashing the system?

Open for discussion.
--
Adam David.  (adamd@rhi.hi.is)

7103_2622@uwovax.uwo.ca (Eric Smith) (03/18/91)

> Sometimes it is difficult to avoid having to run GEM programs. I would like to
> be able to junk GEM during a session without having to reboot, so that the
> memory can be used for something else. It is fairly easy to stop GEM and get on
> with something else in the underlying shell (just send KILL -17 to it), but my
> attempts to quit GEM result in a system crash shortly afterwards. Indeed the
> MiNT docs warn against killing GEM dead, but it should be possible if the right
> precautions are taken. What is necessary to do first so that GEM can be
> successfully removed without trashing the system?
> 

You'll have to restore all the various interrupt vectors that GEM changes when
it starts. These include: the line F vector, the mouse vector, trap #2
vector, critical error handler, and gemdos timeout vector. There are probably
others as well. If you've killed GEM and any of these interrupts happen, the
wrong thing could be done (leading to a crash).
-- 
Eric R. Smith                     email:
Dept. of Mathematics            eric.smith@uwo.ca
University of Western Ontario   7103_2622@uwovax.bitnet