Make sure finalizers are not skipped during exception handling (#22475)
Make sure finalizers are not skipped during exception handling (#22475)

There was a bug in our fork handling that prevented finalizer
for objects kept in frame of unhandled excepion. Previously,
the os._exit() was called in finally clause, and if there was
an unhandled exception raised, the exception was still kept in
memory while finally clause was processed together with the
objects in the same stack frame as the thrown exception that
could lead to those objects not being finalized.

This is mitigated by moving the os._exit() outside of the finally
clause.

Fixes: #22404
cfei18/incubator-airflow,Acehaidrey/incubator-airflow,nathanielvarona/airflow,lyft/incubator-airflow,Acehaidrey/incubator-airflow,cfei18/incubator-airflow,danielvdende/incubator-airflow,cfei18/incubator-airflow,apache/airflow,danielvdende/incubator-airflow,lyft/incubator-airflow,Acehaidrey/incubator-airflow,cfei18/incubator-airflow,Acehaidrey/incubator-airflow,Acehaidrey/incubator-airflow,danielvdende/incubator-airflow,danielvdende/incubator-airflow,apache/airflow,cfei18/incubator-airflow,apache/airflow,Acehaidrey/incubator-airflow,lyft/incubator-airflow,nathanielvarona/airflow,nathanielvarona/airflow,nathanielvarona/airflow,lyft/incubator-airflow,nathanielvarona/airflow,danielvdende/incubator-airflow,apache/airflow,danielvdende/incubator-airflow,cfei18/incubator-airflow,apache/airflow,nathanielvarona/airflow,apache/airflow