using namespace std;
using namespace Msp;
-string run_command(const list<string> &argv)
+/**
+Runs a command and returns its output as a string. The exit status of the
+command is lost.
+*/
+string run_command(const StringList &argv)
{
int pfd[2];
pipe(pfd);
if(pid==0)
{
char *argv_[argv.size()+1];
- for(CountingIterator<const string, list<string>::const_iterator> i=argv.begin(); i!=argv.end(); ++i)
+ for(CountingIterator<const string, StringList::const_iterator> i=argv.begin(); i!=argv.end(); ++i)
argv_[i.count()]=strdup(i->c_str());
argv_[argv.size()]=0;
close(pfd[0]);