Larry writes:
> On 4 May 96 at 8:52, Bruce Toback wrote:
> > How about a CI variable that can be interrogated to find out how much time is
...
> Very interesting idea, Bruce. Additionally, some of your applications
> might be able to shut down gracefully, if they new the machine would be
> down in, say 10 minutes. Big apps wouldn't be able to, but the more
...
I don't think you want a variable ... that implies a polling strategy,
which is (almost) always something you want to avoid on a multi-user
computer.
Instead, MPE/iX has a mechanism for registering processes that want to
be informed about powerfail and shutdown requests. (Well, shutdown for
sure, I think powerfail too, but can't recall positively.)
It would be nice to see it extended in some manner, perhaps something
like XCONTRAP:
XPOWERFAILTEAP (address_of_new_handler, address_of_old_handler);
and
XSHUTDOWNTRAP (address_of_new_handler, address_of_old_handler);
These would register the calling process's PID (Process ID, not PIN) on the
shutdown/powerfail notification list, and would interrupt the processes
into the desired routine if a powerfail was coming, or a shutdown was
coming.
Most of the code necessary for this is in place, although documentation
and testing would be required.
--
Stan Sieler [log in to unmask]
http://www.allegro.com/sieler.html
|