From 9474c4afdf80b64650723fba1a1184c3ee386874 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Feb 2016 07:02:39 -0800 Subject: [PATCH 1/3] Give more details why we fail --- src/core/iomgr/wakeup_fd_pipe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/iomgr/wakeup_fd_pipe.c b/src/core/iomgr/wakeup_fd_pipe.c index 80de181d9d1..40c27aca12b 100644 --- a/src/core/iomgr/wakeup_fd_pipe.c +++ b/src/core/iomgr/wakeup_fd_pipe.c @@ -47,6 +47,11 @@ static void pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; /* TODO(klempner): Make this nonfatal */ + int r = pipe(pipefd); + if (0 != r) { + gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); + abort(); + } GPR_ASSERT(0 == pipe(pipefd)); GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[0], 1)); GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[1], 1)); From 749f10b65d3ce9ed3155292befacda4316950c57 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 7 Mar 2016 20:11:46 -0800 Subject: [PATCH 2/3] Fix copyright --- src/core/iomgr/wakeup_fd_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/wakeup_fd_pipe.c b/src/core/iomgr/wakeup_fd_pipe.c index 40c27aca12b..d1ed505875b 100644 --- a/src/core/iomgr/wakeup_fd_pipe.c +++ b/src/core/iomgr/wakeup_fd_pipe.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without From 1f375d782a6d4d086a3575cac389aa22ed9e9693 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 07:47:18 -0700 Subject: [PATCH 3/3] Duh --- src/core/iomgr/wakeup_fd_pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/iomgr/wakeup_fd_pipe.c b/src/core/iomgr/wakeup_fd_pipe.c index d1ed505875b..dd2fd1f0572 100644 --- a/src/core/iomgr/wakeup_fd_pipe.c +++ b/src/core/iomgr/wakeup_fd_pipe.c @@ -41,9 +41,10 @@ #include #include -#include "src/core/iomgr/socket_utils_posix.h" #include +#include "src/core/iomgr/socket_utils_posix.h" + static void pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; /* TODO(klempner): Make this nonfatal */ @@ -52,7 +53,6 @@ static void pipe_init(grpc_wakeup_fd* fd_info) { gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); abort(); } - GPR_ASSERT(0 == pipe(pipefd)); GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[0], 1)); GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[1], 1)); fd_info->read_fd = pipefd[0];