summaryrefslogtreecommitdiff
path: root/src/stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.cc')
-rw-r--r--src/stream.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream.cc b/src/stream.cc
index 0394c042..c9c0a931 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -134,8 +134,8 @@ output_stream_t::~output_stream_t()
int status;
wait(&status);
- if (status & 0xffff != 0)
- throw std::logic_error("Something went wrong in the pager");
+ if (! WIFEXITED(status) || WEXITSTATUS(status) != 0)
+ throw std::logic_error("Error in the pager");
}
}