summaryrefslogtreecommitdiff
path: root/src/stream.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-30 01:30:33 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-30 01:30:33 -0400
commita54c0f5097abaf4caff032efecc49f286d29dae4 (patch)
tree36f29c20925cad38b2601ea0b6283dba8d9d741e /src/stream.cc
parent9495ca740bc41ea7d88c064d5493816b354a2bf6 (diff)
downloadfork-ledger-a54c0f5097abaf4caff032efecc49f286d29dae4.tar.gz
fork-ledger-a54c0f5097abaf4caff032efecc49f286d29dae4.tar.bz2
fork-ledger-a54c0f5097abaf4caff032efecc49f286d29dae4.zip
Use a more standard method of determining the pager's exit status.
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");
}
}