X-Git-Url: http://git.meshlink.io/?p=catta;a=blobdiff_plain;f=src%2Fsimple-watch.c;h=7719e56cb0e43b557d9f173f6b40e951dc484cad;hp=7a0052d5e915b9eb0166f32061d04b2bf3818ada;hb=dd315fb0f7a90a6f154cbea0e7a7c64b550164b9;hpb=1141784d37d9da9006f3db62d611775bcc0a8c4f diff --git a/src/simple-watch.c b/src/simple-watch.c index 7a0052d..7719e56 100644 --- a/src/simple-watch.c +++ b/src/simple-watch.c @@ -100,7 +100,7 @@ void catta_simple_poll_wakeup(CattaSimplePoll *s) { char c = 'W'; assert(s); - write(s->wakeup_pipe[1], &c, sizeof(c)); + writepipe(s->wakeup_pipe[1], &c, sizeof(c)); s->wakeup_issued = 1; } @@ -113,7 +113,7 @@ static void clear_wakeup(CattaSimplePoll *s) { s->wakeup_issued = 0; for(;;) - if (read(s->wakeup_pipe[0], &c, sizeof(c)) != sizeof(c)) + if (readpipe(s->wakeup_pipe[0], c, sizeof(c)) != sizeof(c)) break; } @@ -364,10 +364,10 @@ void catta_simple_poll_free(CattaSimplePoll *s) { catta_free(s->pollfds); if (s->wakeup_pipe[0] >= 0) - closesocket(s->wakeup_pipe[0]); + closepipe(s->wakeup_pipe[0]); if (s->wakeup_pipe[1] >= 0) - closesocket(s->wakeup_pipe[1]); + closepipe(s->wakeup_pipe[1]); catta_free(s); winsock_exit(); // match the winsock_init in catta_simple_poll_new