summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/signal.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-06-21 10:52:33 -0700
committerShentubot <shentubot@google.com>2018-06-21 10:53:21 -0700
commitd571a4359cebbcf8a9b201bb125f1cdc9fb126e4 (patch)
tree53d993db5ab045897c4ad50bb73670e3f018ffea /pkg/abi/linux/signal.go
parentf2a687001ded18a4343c1aa3bfba18b08c6a816a (diff)
Implement ioctl(FIOASYNC)
FIOASYNC and friends are used to send signals when a file is ready for IO. This may or may not be needed by Nginx. While Nginx does use it, it is unclear if the code that uses it has any effect. PiperOrigin-RevId: 201550828 Change-Id: I7ba05a7db4eb2dfffde11e9bd9a35b65b98d7f50
Diffstat (limited to 'pkg/abi/linux/signal.go')
-rw-r--r--pkg/abi/linux/signal.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkg/abi/linux/signal.go b/pkg/abi/linux/signal.go
index cd09008b5..fed2a159f 100644
--- a/pkg/abi/linux/signal.go
+++ b/pkg/abi/linux/signal.go
@@ -175,3 +175,37 @@ const (
SA_NOMASK = SA_NODEFER
SA_ONESHOT = SA_RESTARTHAND
)
+
+// Signal info types.
+const (
+ SI_MASK = 0xffff0000
+ SI_KILL = 0 << 16
+ SI_TIMER = 1 << 16
+ SI_POLL = 2 << 16
+ SI_FAULT = 3 << 16
+ SI_CHLD = 4 << 16
+ SI_RT = 5 << 16
+ SI_MESGQ = 6 << 16
+ SI_SYS = 7 << 16
+)
+
+// SIGPOLL si_codes.
+const (
+ // POLL_IN indicates that data input available.
+ POLL_IN = SI_POLL | 1
+
+ // POLL_OUT indicates that output buffers available.
+ POLL_OUT = SI_POLL | 2
+
+ // POLL_MSG indicates that an input message available.
+ POLL_MSG = SI_POLL | 3
+
+ // POLL_ERR indicates that there was an i/o error.
+ POLL_ERR = SI_POLL | 4
+
+ // POLL_PRI indicates that a high priority input available.
+ POLL_PRI = SI_POLL | 5
+
+ // POLL_HUP indicates that a device disconnected.
+ POLL_HUP = SI_POLL | 6
+)