summaryrefslogtreecommitdiff
path: root/src/libstddjb/iopause_ppoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/iopause_ppoll.c')
-rw-r--r--src/libstddjb/iopause_ppoll.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstddjb/iopause_ppoll.c b/src/libstddjb/iopause_ppoll.c
index 336bf8e..6194d17 100644
--- a/src/libstddjb/iopause_ppoll.c
+++ b/src/libstddjb/iopause_ppoll.c
@@ -13,6 +13,7 @@
int iopause_ppoll (iopause_fd *x, unsigned int len, tain const *deadline, tain const *stamp)
{
+ int r ;
struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 } ;
if (deadline && tain_less(stamp, deadline))
{
@@ -24,7 +25,12 @@ int iopause_ppoll (iopause_fd *x, unsigned int len, tain const *deadline, tain c
else deadline = 0 ;
}
}
- return ppoll(x, len, deadline ? &ts : 0, 0) ;
+ r = ppoll(x, len, deadline ? &ts : 0, 0) ;
+ 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 ;
}
#else