summaryrefslogtreecommitdiff
path: root/examples/example-libevent.c
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2020-07-10 12:53:52 -0700
committerGitHub <noreply@github.com>2020-07-10 12:53:52 -0700
commit1864e76ea7323fd8789d9c8b5b3c8ca27d4840a6 (patch)
tree42688dce1a829420001322fb7af30248ff6251e5 /examples/example-libevent.c
parentada366527943b53d749963797080966f99e837f4 (diff)
Some Windows quality of life improvments. (#846)
* Don't try to ignore SIGPIPE in Windows (it doesn't exist). * Add an include to our win32.h compatibility header. * Enable building examples on Travis in Windows. See #831
Diffstat (limited to 'examples/example-libevent.c')
-rw-r--r--examples/example-libevent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/example-libevent.c b/examples/example-libevent.c
index 1fe71ae..f3fa2a6 100644
--- a/examples/example-libevent.c
+++ b/examples/example-libevent.c
@@ -38,7 +38,10 @@ void disconnectCallback(const redisAsyncContext *c, int status) {
}
int main (int argc, char **argv) {
+#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
+#endif
+
struct event_base *base = event_base_new();
redisOptions options = {0};
REDIS_OPTIONS_SET_TCP(&options, "127.0.0.1", 6379);