Redirect stderr to /dev/null in run_command
*/
FS::Path Builder::get_package_location(const string &name)
{
+ if(verbose>=3)
+ cout<<"Looking for package "<<name<<'\n';
+
// Try to get source directory with pkgconfig
list<string> argv;
argv.push_back("pkg-config");
pkg_dirs.push_back(full);
}
}
+ if(verbose>=3)
+ cout<<pkg_dirs.size()<<" packages found in path\n";
}
bool msp=!name.compare(0, 3, "msp");
#include <iostream>
#include <sys/wait.h>
+#include <fcntl.h>
#include <cstdlib>
#include <cstring>
#include "misc.h"
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);