On current macOS versions a program that receives a signal during an
execve can fail with a SIGILL signal. This appears to be a macOS
kernel bug. It has been reported to Apple.
This CL partially works around the problem by using execLock to not
send preemption signals during execve. Of course some other stray
signal could occur, but at least we can avoid exacerbating the problem.
We can't simply disable signals, as that would mean that the exec'ed
process would start with all signals blocked, which it likely does not
Trust: Ian Lance Taylor <email@example.com>
Run-TryBot: Ian Lance Taylor <firstname.lastname@example.org>
TryBot-Result: Go Bot <email@example.com>
Reviewed-by: Cherry Zhang <firstname.lastname@example.org>
(cherry picked from commit 64fb6ae)