The errno save/restore code added for bug 19701 could maintain this flag, too.
What about adding a bridge function on all installed signal handlers that set/reset a per thread flag?