aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/wakeup_fd_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/wakeup_fd_pipe.c')
-rw-r--r--src/core/lib/iomgr/wakeup_fd_pipe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c
index 4e5dbdcb73..3dc94c94ba 100644
--- a/src/core/lib/iomgr/wakeup_fd_pipe.c
+++ b/src/core/lib/iomgr/wakeup_fd_pipe.c
@@ -95,8 +95,13 @@ static void pipe_destroy(grpc_wakeup_fd* fd_info) {
}
static int pipe_check_availability(void) {
- /* Assume that pipes are always available. */
- return 1;
+ grpc_wakeup_fd fd;
+ if (pipe_init(&fd) == GRPC_ERROR_NONE) {
+ pipe_destroy(&fd);
+ return 1;
+ } else {
+ return 0;
+ }
}
const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable = {