diff options
author | Etienne Perot <eperot@google.com> | 2020-12-03 06:18:03 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-03 06:20:29 -0800 |
commit | 6f60a2b0a27a742690aa6acd5df1912ccb5fc8d3 (patch) | |
tree | b706a5e534592d9aaa7fb4dc6237b4ab3686af13 /pkg/abi/linux | |
parent | 80552b936d06e43ea77df09a6b6c5ce2600a6f6a (diff) |
Implement `fcntl` options `F_GETSIG` and `F_SETSIG`.
These options allow overriding the signal that gets sent to the process when
I/O operations are available on the file descriptor, rather than the default
`SIGIO` signal. Doing so also populates `siginfo` to contain extra information
about which file descriptor caused the event (`si_fd`) and what events happened
on it (`si_band`). The logic around which FD is populated within `si_fd`
matches Linux's, which means it has some weird edge cases where that value may
not actually refer to a file descriptor that is still valid.
This CL also ports extra S/R logic regarding async handler in VFS2.
Without this, async I/O handlers aren't properly re-registered after S/R.
PiperOrigin-RevId: 345436598
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r-- | pkg/abi/linux/fcntl.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/abi/linux/fcntl.go b/pkg/abi/linux/fcntl.go index cc3571fad..d1ca56370 100644 --- a/pkg/abi/linux/fcntl.go +++ b/pkg/abi/linux/fcntl.go @@ -25,6 +25,8 @@ const ( F_SETLKW = 7 F_SETOWN = 8 F_GETOWN = 9 + F_SETSIG = 10 + F_GETSIG = 11 F_SETOWN_EX = 15 F_GETOWN_EX = 16 F_DUPFD_CLOEXEC = 1024 + 6 |