On Sun, 2006-11-19 at 20:14 +0100, Jason Tackaberry wrote:
> Log:
> Fix bug in notifier where KeboardInterrupt was not being handled during
> select in step().

More about this bug ...

It is easy to reproduce when there is a child process (a Process
instance) and you hit ctrl-c twice in quick succession.  The first
ctrl-c exits the mainloop and causes Watcher.killall() to run.  This
manually calls notifier.step() in a loop.  But the second ctrl-c is
likely to abort the select() call inside step(), which, because it
wasn't handled, was not decrementing the global depth counter.  Next
time notifier.step() is called inside Watcher.killall() you get a
maximum recursion depth error.

This isn't really fully fixed though.  A second ctrl-c is _likely_ to
abort select() but it could happen elsewhere, and there are spots inside
step() where this won't be handled.  The whole step() function needs to
be fixed to wrap all the code inside a try/except block that handles
KeyboardInterrupt and SystemExit and will decrement __step_depth and set
__in_step to False before propagating the exception.

I didn't want to make this change myself though in case crunchy has a
better idea.  I also don't want to do much with that code because there
is an annoying mix of spaces and tabs for indentation that aren't even
being used in a consistent manner.

Jason.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to