X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=src%2Fpipestream.hxx;h=f53f474c53b3e27579531bc58dbb38a2c22a8605;hb=ad4490f1cee6c48f81af20b691e2784b00e25286;hp=4b645ef316996ddeec1add38087b1cc62512abfe;hpb=8621037f955fa6615e2252ad5a058eafbb6f5f33;p=libi2ncommon diff --git a/src/pipestream.hxx b/src/pipestream.hxx index 4b645ef..f53f474 100644 --- a/src/pipestream.hxx +++ b/src/pipestream.hxx @@ -29,6 +29,7 @@ on this file might be covered by the GNU General Public License. #include +#include #include #include #include @@ -69,9 +70,11 @@ typedef struct ExecResult ExecResult; std::string capture_exec(const std::string& command, ExecResult &rescode); std::string capture_exec(const char *const *command, ExecResult &rescode, - const bool out=true, const bool err=false); + const bool out=true, const bool err=false, + const bool path=false); std::string capture_exec(const std::vector& command, ExecResult &rescode, - const bool out=true, const bool err=false); + const bool out=true, const bool err=false, + const bool path=false); inline std::string capture_exec (const std::string &command) { @@ -114,11 +117,11 @@ protected: public: inpipebuf(const std::string& command, - const bool out, const bool err); + const bool out, const bool err, const bool path); inpipebuf(const char *const *command, - const bool out, const bool err); + const bool out, const bool err, const bool path); inpipebuf(const std::vector &command, - const bool out, const bool err); + const bool out, const bool err, const bool path); ~inpipebuf(); @@ -130,7 +133,8 @@ protected: private: std::pair init_without_shell (const char *const *argv, - const bool out, const bool err) const; + const bool out, const bool err, + const bool path) const; }; /** @brief stream around inpipebuf -- see comment there */ @@ -141,18 +145,21 @@ protected: public: inpipestream(const std::string& command, - const bool out=true, const bool err=false) - : std::istream(&buf), buf(command, out, err) + const bool out=true, const bool err=false, + const bool path=false) + : std::istream(&buf), buf(command, out, err, path) {} inpipestream(const char *const command[], - const bool out=true, const bool err=false) - : std::istream(&buf), buf(command, out, err) + const bool out=true, const bool err=false, + const bool path=false) + : std::istream(&buf), buf(command, out, err, path) {} inpipestream(const std::vector &command, - const bool out=true, const bool err=false) - : std::istream(&buf), buf(command, out, err) + const bool out=true, const bool err=false, + const bool path=false) + : std::istream(&buf), buf(command, out, err, path) {} void store_exit_status(bool *_status_set, int *_exit_status)