prevent code from running under a thread id which already gave ESRCH