python | start new thread that will impersonate another uid without affecting main thread

Advertisements I with to create a new thread which will impersonate to another uid, execute a task and finish, while my main thread will keep is original uid all the time. impersonation can easily be achieved by using os.setuid(self.impersonation_uid) but how can I make sure that it won’t change my original uid from the main… Read More python | start new thread that will impersonate another uid without affecting main thread