Fix poll able streams for Darwin (and probably BSD)
authorJohn Ralls <jralls@ceridwen.us>
Fri, 9 Nov 2012 17:22:19 +0000 (09:22 -0800)
committerJohn Ralls <jralls@ceridwen.us>
Fri, 9 Nov 2012 17:23:01 +0000 (09:23 -0800)
commitb65dac802e4c1bad3b3dd681f35eff52129b6d9e
treea90bd59538a455684900d898b5e445ed64b70b0b
parent5588d47985073563749066ed18a981b1ff437f14
Fix poll able streams for Darwin (and probably BSD)

Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes.

That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.
gio/gsocket.c
gio/gunixinputstream.c
gio/gunixoutputstream.c
gio/tests/converter-stream.c
gio/tests/pollable.c