diff options
Diffstat (limited to 'src/libstddjb/iopause_poll.c')
-rw-r--r-- | src/libstddjb/iopause_poll.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstddjb/iopause_poll.c b/src/libstddjb/iopause_poll.c index 0c7c681..f189974 100644 --- a/src/libstddjb/iopause_poll.c +++ b/src/libstddjb/iopause_poll.c @@ -8,6 +8,7 @@ int iopause_poll (iopause_fd *x, unsigned int len, tain const *deadline, tain const *stamp) { + int r ; int millisecs = 0 ; if (!deadline) millisecs = -1 ; else if (tain_less(stamp, deadline)) @@ -16,5 +17,10 @@ int iopause_poll (iopause_fd *x, unsigned int len, tain const *deadline, tain co tain_sub(&t, deadline, stamp) ; millisecs = tain_to_millisecs(&t) ; } - return poll(x, len, millisecs) ; + r = poll(x, len, millisecs) ; + if (r > 0) + for (unsigned int i = 0 ; i < len ; i++) + if (x[i].revents & IOPAUSE_EXCEPT) + x[i].revents |= x[i].events ; + return r ; } |