From 9f1e3853359575fbc27c846027e2784cee981bd0 Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Wed, 11 Oct 2017 18:36:28 -0700 Subject: [PATCH] Return errno from handle_sigpipe. (#1051) --- src/plasma/plasma_manager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plasma/plasma_manager.cc b/src/plasma/plasma_manager.cc index 75b374ccf656..d771a1fc8ada 100644 --- a/src/plasma/plasma_manager.cc +++ b/src/plasma/plasma_manager.cc @@ -47,7 +47,9 @@ int handle_sigpipe(Status s, int fd) { return 0; } - switch (errno) { + int err = errno; + + switch (err) { case EPIPE: { ARROW_LOG(WARNING) << "Received EPIPE when sending a message to client on fd " << fd @@ -74,6 +76,8 @@ int handle_sigpipe(Status s, int fd) { CHECK(0); LOG_FATAL("Failed to write message to client on fd %d", fd); } + + return err; } /**