You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The go runtime can interrupt the program quite frequently with SIGURG
(this is exacerbated in go >= 1.14). For that reason, if these C
function return code is not 0 and errno is set to EINTR, we run them
again transparently for the user.
Also, it is possible that errno is set to ENOENT by the ioctl() syscall
done underneath, and what this means is that the notification is not
valid anymore (the kernel sets that). For users of this library to know
when this notification is not valid anymore, we return it in this case
too. This was useful for us to properly react to different failures in
our seccomp agent in golang.
To do this we can't rely on the return code from libseccomp, and need to
check the errno, because libseccomp returns fixed codes for errors.
Like, for example here[1], but it does this for the other functions
changed here too.
These issues were reported to libseccomp here:
seccomp/libseccomp#302.
[1]: https://github.com/seccomp/libseccomp/blob/main/src/system.c#L501-L502
Signed-off-by: Rodrigo Campos <[email protected]>
Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
0 commit comments