I'm trying to debug an issue in a Qt5 application where, for some reason, even after the application reaches its exit point (log message placed right before return 0 of int main shows), the process persists and when running "ps -e" and grepping for the process, it will show a process in the background.
Is there a way I can diagnose where this thread is in the background? All my log messages indicate that all Qt windows have been closed, and the "setQuitOnLastWindowClosed" flag is set to true. So the only thing I can think of is that a thread spawned by the application is still running in the background.
I should note that this does not ALWAYS happen. When the user exits the application normally, this does not happen. But when the machine detects a power cycle, it forces a close, but it seems something is missing in the code it runs in this case, so figuring out what's still running will help me find that.
The application was built in Qt5 and it's running on Scientific Linux 6.4 if that matters.