aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:43:43 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:57:05 +0100
commit89487ae270cf49a239cef7c264ff39cb7b35bb5a (patch)
treee036893f166f59623d04f192b5974b962821417a
parentdc29bb3d722b70c0ed12c022f9fcd758f9163505 (diff)
downloadpaludis-89487ae270cf49a239cef7c264ff39cb7b35bb5a.tar.gz
paludis-89487ae270cf49a239cef7c264ff39cb7b35bb5a.tar.xz
paludis -> Process
-rw-r--r--src/clients/paludis/applets.cc9
-rw-r--r--src/clients/paludis/info.cc3
2 files changed, 8 insertions, 4 deletions
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 7ce8eb4..a436f65 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -28,6 +28,7 @@
#include <paludis/util/system.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/timestamp.hh>
+#include <paludis/util/process.hh>
#include <paludis/repository_factory.hh>
#include <string>
#include <set>
@@ -384,9 +385,11 @@ int do_list_sync_protocols(const std::shared_ptr<Environment> & env)
s != s_end ; ++s)
{
std::cout << "* " << colour(cl_key_name, s->first) << std::endl;
- if (0 != run_command(Command(s->second + " --help")
- .with_setenv("PALUDIS_FETCHERS_DIRS", join(sd->begin(), sd->end(), " "))
- .with_setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis"))))
+ Process process((ProcessCommand(s->second + " --help")));
+ process
+ .setenv("PALUDIS_FETCHERS_DIRS", join(sd->begin(), sd->end(), " "))
+ .setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis"));
+ if (0 != process.run().wait())
Log::get_instance()->message("paludis.syncer_help.failure", ll_warning, lc_context)
<< "Syncer help command '" << s->second << " --help' failed";
std::cout << std::endl;
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 5a6b502..7743beb 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -32,6 +32,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/timestamp.hh>
#include <paludis/util/accept_visitor.hh>
+#include <paludis/util/process.hh>
#include <paludis/package_database.hh>
#include <paludis/environment.hh>
#include <paludis/package_id.hh>
@@ -317,7 +318,7 @@ do_info(const std::shared_ptr<const Environment> & env)
cout << colour(cl_heading, "System:") << endl;
cout << " " << flush;
- int status(run_command(Command("uname -a")));
+ int status(Process((ProcessCommand("uname -a"))).run().wait());
if (0 != status)
Log::get_instance()->message("info.uname.failure", ll_warning, lc_context)
<< "uname -a failed with status " << status;