Avoid std::terminate in FsUserContext destructor (Plan9) (#40417)
* Replace throwing macros with logging in FsUserContext destructor FsUserContext::~FsUserContext() used THROW_LAST_ERROR_IF() which throws exceptions. If this destructor runs during stack unwinding from another exception, std::terminate is called immediately. Replace with LOG_LAST_ERROR_IF() to log failures without throwing. These syscalls (setresuid/setresgid/setgroups to restore root) should virtually never fail, but if they do, logging is the appropriate response in a destructor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use try/CATCH_LOG since LOG_LAST_ERROR_IF is not defined on Linux Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Ben Hillis <benhillis@microsoft.com>