I don't have a solution to the problem you want to solve but, if I needed to solve that problem, the first thing I would investigate is what happens to an application when it is handling an exception condition.
Here are some things I would investigate:
1. if the exception or abnormal condition is being handled by the O/S then, _maybe_ the O/S suspends all the process threads until the exception is acknowledged. Under Windows, that is detectable.
2. Another thing I'd look at is what does the thread stack look like ?. Two common characteristics of a thread handling an exception is that the window in which the problem is displayed is application modal. There are a couple common side effects of that, 1. the stack is "stable" (the stack pointer does not change until the user acknowledges the problem, that can be detected) and 2. there is usually an address on the stack to a low level routine that returns control to a ring 0 routine that will do any necessary clean up and resume the thread's execution if possible. It's a bit complicated but it is detectable.
The "gist" of the whole thing is figuring out what changes take place in an application when it is handling an exception then, figure out how to detect those changes quickly and reliably. Basically, you're looking for a detectable pattern in the application's state.
I cannot offer any Linux specific suggestions since my knowledge of that O/S internals is much too deficient to offer anything specific but, I think the above is probably an approach worth investigating.
HTH.