summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2014-04-02 19:12:23 -0500
committerJohn Wiegley <johnw@newartisans.com>2014-04-02 19:12:23 -0500
commit8ca2ecd914745647e5d4b1d8a71bffe33146f3d5 (patch)
tree114adfb82c623e1c03377116100ab350b3533070 /src
parentafa32dee1b2129973b0ed8882b5d133ed21959f6 (diff)
parent0e2d07c801be8a35a424332115dbd33540a3a82b (diff)
downloadfork-ledger-8ca2ecd914745647e5d4b1d8a71bffe33146f3d5.tar.gz
fork-ledger-8ca2ecd914745647e5d4b1d8a71bffe33146f3d5.tar.bz2
fork-ledger-8ca2ecd914745647e5d4b1d8a71bffe33146f3d5.zip
Merge pull request #270 from matled/master
use /bin/sh to run the pager
Diffstat (limited to 'src')
-rw-r--r--src/stream.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/stream.cc b/src/stream.cc
index fcd030b6..e4eb7800 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -80,18 +80,10 @@ namespace {
close(pfd[1]);
close(pfd[0]);
- // Find command name: its the substring starting right of the
- // rightmost '/' character in the pager pathname. See manpage for
- // strrchr.
-#if BOOST_VERSION >= 103700
- path basename(pager_path.filename());
-#else
- path basename(pager_path.leaf());
-#endif
- execlp(pager_path.string().c_str(), basename.string().c_str(), NULL);
+ execlp("/bin/sh", "/bin/sh", "-c", pager_path.string().c_str(), NULL);
// We should never, ever reach here
- perror((std::string("execlp: ") + pager_path.string()).c_str());
+ perror("execlp: /bin/sh");
exit(1);
}
else { // parent