MantisBT - JANA
View Issue Details
0000268JANABugpublic2012-07-09 10:102012-08-16 09:41
davidl 
davidl 
normalminorsometimes
resolvedfixed 
0000268: Ctl-C causes program to hang
Sometimes a program hangs (or appears to) and the user hits Ctl-C several times to kill it. Eventually, it tries to do a more serious kill, but the program is hopelessly hung until the user kills it externally.

This may be due to the main thread being held up in pthread_join while the thread it's waiting on has been otherwise destroyed.
No tags attached.
Issue History
2012-07-09 10:10davidlNew Issue
2012-08-16 09:41davidlNote Added: 0000430
2012-08-16 09:41davidlStatusnew => resolved
2012-08-16 09:41davidlResolutionopen => fixed
2012-08-16 09:41davidlAssigned To => davidl

Notes
(0000430)
davidl   
2012-08-16 09:41   
Added a call to JApplication::Fini(...) and then the JApplication destructor when 3 SIGINTs are received. An optional argument allows the locking of the app mutex to be skipped in Fini, hopefully minimizing the chances that it gets stuck. Program exits when 3 SIGINTs are received afterwards.

If 6 SIGINTs are received, then the program just tries to exit immediately. This could be useful if the program gets stuck in the Fini or ~JApplication methods while handling the 3rd SIGINT.

I did not have a working system that exhibited the problem so this really couldn't be tested.