[Tutor] Access to Windows Timers / Idle "states"??

Javier JJ python.tutorial@jarava.org
Wed, 6 Jun 2001 15:10:05 +0200


> | The thing is, I have a program that every now and then locks itself
solid
> | and the only way out is a hard reboot (even in W2k, ctrl-alt-del won't
work,
> | even though the OS "seems" to be getting the keys, and the mouse cursor
> | moves).
>
> I've seen this with win2k also.  Sometimes it is the OS's own fault as
> it tries to shutdown (though sometimes I wonder if it is really trying
> ...)

MM... Personally, I've only experienced this on programs that run fullscreen
and "take over" the display, like the program on my WinTV card, Games....
it's probably something to do with DirectX or similar... and that's a beast
I won't touch with a 10 meter pole :) So, as the OS seems to be "receiving"
input still (sometimes - not always- I've been able to ctrl-alt-del, open
the the task manager and kill the beast), I was wondering about how to
"build my own watchdog timer" :-))

> | So, I'd like to be able to "sense" when the OS hasn't been getting
> | any imput (keys / mouse) for a set period of time and, if that
> | happens, it'll just kill the offending process....
> |
> | Am I making any sense at all?
>
> Yes -- you want to prevent your OS from locking up (IOW failing to

Welll. it's not really (at least it doesn't seem) like it's really frozen
solid.. only that the screen is and not all inputs are handled.. but the
network and services go on (eprompter keeps checking the mail, etc). I had
wondered about another solution: building a xmlrpc or similar server that
would let me "kill" the offending process when triggered from another
machine. Buy having the two computers on is something I'd rather avoid :-))

> meet its requirements).  The solution is much simpler : use Debian! <grin>

Well, I do :-)) (Ok, not Debian, but Mandrake). Problem is, I haven't found
HlafLife - Front Line Force for Linux .... and besides, I don't think I
could switch to linux and be 100% productive as of yet ....

> Sorry, not much help with the code, but I don't try and fix windows by
> writing my own watchdog timer <wink> and am not sure how you would do
> that reliably.

Well, _if_ there is a way of "hooking" onto the event(s) that Windows uses
to signal "no activity" (ie, the same ones that the OS uses to know when to
fire the screensaver), that'd be fairly simple to do. ..

Thanks for the idea, though. I'll look into watchdogs :-))

    Javier

----

Famous last words - Don't worry, I can handle it.