- ExternalTask task(argv);
- task.set_stdout(ExternalTask::CAPTURE);
- task.set_stderr(ExternalTask::IGNORE);
- task.start();
- Task::Status status;
- while((status=task.check())==Task::RUNNING)
- Time::sleep(10*Time::msec);
- if(status==Task::ERROR)
- throw runtime_error(format("pkg-config for package %s failed", pkg));
-
- return task.get_output();