Comment 3 for bug 259761

Revision history for this message
Colin Watson (cjwatson) wrote :

It seems like sheer coincidence that it crashes on shutdown. do_animate is an absolutely horrific thing to call in a signal handler and we're very lucky that it works at all.

Rather than applying this band-aid, I think it would be better to fix it properly. Since main_loop uses select() and Linux doesn't have a working pselect() last I checked, we'll need to use the self-pipe trick: the SIGALRM handler should write a byte to a pipe which we monitor in main_loop. I'm thinking of something along the lines of the attachment but I have not tested this at all.