[gsignal] Fix closure invalidation
If the closure is invalidated we drop the ref on the signal handler node, but if the signal is currently being dispatched, the ref could be held elsewhere. Flag that we no longer have an outstanding invalidation handler so that we don't try to unregister ourselves when the other ref drops. Add a testcase that catches this situation.
Showing with 37 additions and 0 deletions