Padraig O'Briain wrote: > I tried trapping the KeyboardInterrupt but this did not seem to work > reliably because packagemanager is multithreaded. > > Padraig > > On 01/20/09 16:50, Shawn Walker wrote: > >> Padraig O'Briain wrote: >> >>> The webrev http://cr.opensolaris.org/~padraig/ips-6019-v1/ fixes >>> bug 6109 ctrl-c hangs packagemanager >>> >>> The fix is to define a signal handler for SIGINT. >>> >> You've overcomplicated this way too much. >> >> All you need to do is trap the KeyboardInterrupt exception that Python >> will raise when this happens. >> >> Looking at the PyGTK faq there appears to be timer support added in PyGTK for this post 1.9, but if its not working reliably then using the signal handler seems perfectly reasonable and not over complicated. It is after all just a handler and I can see plenty of code examples on the web using this approach (including in the above mentioned faq).
+1 JR > _______________________________________________ > pkg-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/pkg-discuss > _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
