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

ak@silmarill.org ak@silmarill.org
Wed, 06 Jun 2001 13:48:11 -0400


On Wed, Jun 06, 2001 at 01:03:45PM -0400, D-Man wrote:
> On Wed, Jun 06, 2001 at 03:10:05PM +0200, Javier JJ wrote:
> | > | 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 :-))
> 
> I think telnetd or sshd might be distributed with cygwin.  Any real
> networked/multiuser OS allows for remote access anyways...
> 
> (where'd the 'su' equivalent disappear to... I shouldn't be logged in as
> administrator for day-to-day work, yet I shouldn't have to log out
> just to install a new toy... oh, yeah, this is windows <wink>)
> 
> | > 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
> 
> <grin>
> 
> | 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. ..
> 
> Does the screensaver kick in if you leave it idle long enough?  If so
> then you should write a screensaver :-).  The screensaver won't be an
> ordinary, flash-some-colors-on-the-screen sort of thing but it would
> kill the offending process if it exists then exec the "real"
> screensaver for those situations where you really want a screen saver.
> 
> I think this sort of thing would be relatively easy if MS allowed for
> custom window managers because the window manager gets all input
> (keyboard, mouse, etc) events and figures out whether to keep them
> (and deal with it) or pass it on to the app.  I suppose, if this were
> X, you could create a layer that would see all events from the X
> server and determine whether to kill the bad app or not and pass them
> on to the real WM.

Well if this was X, you could just ctrl-alt-F2 to second console and
kill the offending process.. :-)

> 
> Anyways, the telnetd or screensaver idea are the most realistic/doable
> ideas.
> 
> -D
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
Jupiter and Saturn Oberon Miranda
And Titania Neptune Titan
Stars can frighten
        - Syd