summaryrefslogtreecommitdiff
path: root/src/stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.cc')
-rw-r--r--src/stream.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/stream.cc b/src/stream.cc
index c00c4cc5..c5a40e87 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2013, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -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