Ken Thomases ken@codeweavers.com writes:
I suppose we could put a loop around the exec call, such that we sleep and retry if it returns ENOTSUP. However, if terminate_main_thread was unsuccessful, or if ENOTSUP can occur for other reasons, that might be an infinite loop.
That would be preferable. To avoid an infinite loop you can do an exponential wait with a limit or something like that. Also you should only try to terminate the main thread when execve actually fails, this way there's no penalty if the OS doesn't have the ENOTSUP bug.