summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/event.c')
-rw-r--r--libglusterfs/src/event.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libglusterfs/src/event.c b/libglusterfs/src/event.c
index aeef67107f5..09ecce1599d 100644
--- a/libglusterfs/src/event.c
+++ b/libglusterfs/src/event.c
@@ -21,6 +21,7 @@
#include "mem-pool.h"
#include "common-utils.h"
#include "libglusterfs-messages.h"
+#include "syscall.h"
@@ -177,7 +178,7 @@ poller_destroy_handler (int fd, int idx, void *data,
if (readfd < 0)
return -1;
- while (read (readfd, &buf, 1) > 0) {
+ while (sys_read (readfd, &buf, 1) > 0) {
}
return 0;
}
@@ -254,7 +255,7 @@ event_dispatch_destroy (struct event_pool *event_pool)
int retry = 0;
while (event_pool->activethreadcount > 0 && retry++ < 10) {
- if (write (fd[1], "dummy", 6) == -1)
+ if (sys_write (fd[1], "dummy", 6) == -1)
break;
sleep_till.tv_sec = time (NULL) + 1;
ret = pthread_cond_timedwait (&event_pool->cond,
@@ -268,9 +269,9 @@ event_dispatch_destroy (struct event_pool *event_pool)
out:
if (fd[0] != -1)
- close (fd[0]);
+ sys_close (fd[0]);
if (fd[1] != -1)
- close (fd[1]);
+ sys_close (fd[1]);
return ret;
}