Similar but not so similar to this question - What happens when a town is under quarantine and my visa expires
This is a generic question which sparkles out of the currently ongoing events in Wuhan, China: US and Japan currently flying their citizens out of Wuhan. EU will be doing the same shortly for their citizens.
In cases like such, where with the help of an embassy an airlift is arranged and you're taken out of the country, what happens to your immigration record/status?
If you've received an entry stamp into your passport, would anyone be there to give you an exit stamp and possibly add the exit information into their computer systems? (Especially in this case, I believe there is a ban on (commercial?) flights out of Wuhan, so I don't believe there will be many immigration officers at hand in an empty airport? I assume these flights take place from some airport.)
Is there a chance you could end up technically overstaying in the country even though you are no longer there anymore? Would there be a way to correct this if that happens?