Open
Description
The implementation of syscall.Syscall in the Go frontend version of the library sets errno
to 0
, calls the C library function syscall
, and then checks errno
. If the final value of errno
is not 0
, then syscall.Syscall
returns a non-nil error
value. This is the only documented way to check whether the C syscall
function failed. Unfortunately, it is not reliable if a signal handler runs on the thread while syscall
is executing. The signal handler may happen to set errno
to a non-zero value while it executes. We should figure out a more reliable way to determine whether syscall
failed. This may require writing assembly code.