Use a more standard method of determining the pager's exit status.

This commit is contained in:
John Wiegley 2009-01-30 01:30:33 -04:00
parent 9495ca740b
commit a54c0f5097

View file

@ -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");
}
}