[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] MiNT termination



Hi all,

Now, when the init process terminates, the MiNT does less or more the
following:

- kills all processes left
- restores old settings
- quits to TOS

Restoring old settings involves restoring old screen settings. This often
fails on my Falcon causing a hang instead of entering TOS.

Despite this sad fact, if the init process terminates, there's no way to
get the system back up from remote. If it doesn't hang, it will enter TOS
and sit there until someone comes to the machine and hits the RESET key.

So, maybe the idea of going to TOS when MiNT terminates isn't very good
anymore. 

Say if init terminates, MiNT wouldn't bother restoring old TOS settings,
but just would go reboot instead of quitting to TOS. Such a solution
would allow to avoid a crash while restoring screen (doesn't make much
sense when MiNT boots in ST-high, then tries to make ST-high back from
800x600/256 at own exit) and there would be a chance to get system back
running even if root accidentally killed init process.

Additionally, I would be for moving the function of killing all processes
from MiNT to init. I.e. init, when hit by SIGTERM or similar signal, would
kill everyone (its children), then terminate. So if init terminates, the
kernel could assume that there are no processes left, i.e. just do some
Sync(), then straight reboot.

On systems without init.prg, ie. where AES is used, would be the same.
I.e. the AES would only care on killing children at shutdown time, then
it would exit, what would be a signal for the kernel that it should reboot
the machine.

I believe this also would solve the problem with assert from pipefs.c
sometimes occuring while shutting the system down.

Any comments?

--
Konrad M.Kokoszkiewicz
|mail: draco@mi.com.pl                  | Atari Falcon030/TT030/65XE |
|http://www.orient.uw.edu.pl/~conradus/

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.