thread safety for _exit and exitcodes and process table