From 3772879ebdf452eeb9e8e2c04c07338c4933a3ed Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 15 Aug 2008 18:14:03 +0000 Subject: [PATCH] Add some output to get_package_source Redirect stderr to /dev/null in run_command --- source/builder.cpp | 5 +++++ source/misc.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/builder.cpp b/source/builder.cpp index 58288ff..b77b8fc 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -481,6 +481,9 @@ and if it fails, the package path is searched for matches. */ FS::Path Builder::get_package_location(const string &name) { + if(verbose>=3) + cout<<"Looking for package "< argv; argv.push_back("pkg-config"); @@ -504,6 +507,8 @@ FS::Path Builder::get_package_location(const string &name) pkg_dirs.push_back(full); } } + if(verbose>=3) + cout< #include +#include #include #include #include "misc.h" @@ -37,7 +38,10 @@ string run_command(const StringList &argv) close(pfd[0]); dup2(pfd[1], 1); - dup2(pfd[1], 2); + close(pfd[1]); + int devnull=open("/dev/null", O_WRONLY); + dup2(devnull, 2); + close(devnull); execvp(argv_[0], argv_); ::exit(1); -- 2.43.0