summaryrefslogtreecommitdiff
path: root/os/osinit.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-26 10:40:44 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-21 15:04:47 -0400
commitf993091e7db81b0420e23c485378cba112278839 (patch)
tree1fa9dc096853f7a8c512f76e4d7f57c8a132e598 /os/osinit.c
parent8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e (diff)
os: Switch server to poll(2) [v3]
Eliminates all of the fd_set mangling in the server main thread v2: Listen for POLLOUT while writes are blocked. v3: Only mark client not ready on EAGAIN return from read Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os/osinit.c')
-rw-r--r--os/osinit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/osinit.c b/os/osinit.c
index 629fef569..ab9c1d657 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -195,7 +195,9 @@ OsInit(void)
#ifdef BUSFAULT
busfault_init();
#endif
- InitNotifyFds();
+ server_poll = ospoll_create();
+ if (!server_poll)
+ FatalError("failed to allocate poll structure");
#ifdef HAVE_BACKTRACE
/*