We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1693

Summary: If the program hangs it's horribly hard to kill it
Product: SDL Reporter: Sik <sik.the.hedgehog>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   

Description Sik 2013-01-12 15:29:21 UTC
Sometimes I screw up the code of my game and end up with an infinite loop. Naturally, the program hangs. The problem is that killing the process can be a chore...

1) If I try to click the close button several times, I don't get any prompt about the program being hung (as usually would happen when it isn't responding to events and such).

2) Then I try to use "killall", but the window still remains on screen for some reason (usually windows would get killed along with the process).

3) Then I try "xkill" and that can kill the window, but the terminal where the program was run from is still stuck (of course Ctrl+C doesn't work), leaving me with no option but to close that terminal tab (which prompts me if I'm sure because a process is still running on it!).

Does anybody know what's up with all this? If the program gets stuck I should be able to kill it without much trouble! I shouldn't need more than #1, in fact (assuming the program has a window for starters).

Using Ubuntu 11.10.
Comment 1 Sam Lantinga 2013-01-12 17:42:15 UTC
Try kill -3
SDL catches other signals and allows the program to gracefully clean up.  This is very important for certain environments where the graphics display will not recover if SDL isn't gracefully shut down.