aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:27:39 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-21 19:57:05 +0100
commit447a8b665a0c4639db27ee788b3e2e505c6ed6ad (patch)
tree601989b032a90ba86ac13f034a4d7c6720fd916e
parent270fc45d005bc91f2bb3fb352f60f8900dc2383c (diff)
downloadpaludis-447a8b665a0c4639db27ee788b3e2e505c6ed6ad.tar.gz
paludis-447a8b665a0c4639db27ee788b3e2e505c6ed6ad.tar.xz
resolve -> Process
-rw-r--r--src/clients/cave/resolve_common.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 551ef0b..eb87b49 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -45,6 +45,7 @@
#include <paludis/util/return_literal_function.hh>
#include <paludis/util/join.hh>
#include <paludis/util/tribool.hh>
+#include <paludis/util/process.hh>
#include <paludis/args/do_help.hh>
#include <paludis/args/escape.hh>
@@ -241,11 +242,11 @@ namespace
a != a_end ; ++a)
command = command + " " + args::escape(*a);
- paludis::Command cmd(command);
- cmd
- .with_input_stream(&ser_stream, -1, "PALUDIS_SERIALISED_RESOLUTION_FD");
+ Process process((ProcessCommand(command)));
+ process
+ .send_input_to_fd(ser_stream, -1, "PALUDIS_SERIALISED_RESOLUTION_FD");
- return run_command(cmd);
+ return process.run().wait();
}
else
return DisplayResolutionCommand().run(env, args, resolved);
@@ -316,9 +317,6 @@ namespace
if (program_options.a_execute_resolution_program.specified() || resolution_options.a_execute.specified())
{
- /* backgrounding this barfs with become_command. working out why could
- * be a fun exercise for someone with way too much time on their hands.
- * */
StringListStream ser_stream;
serialise_job_lists(ser_stream, *resolved->job_lists());
@@ -341,11 +339,13 @@ namespace
a != a_end ; ++a)
command = command + " " + args::escape(*a);
- paludis::Command cmd(command);
- cmd
- .with_input_stream(&ser_stream, -1, "PALUDIS_SERIALISED_RESOLUTION_FD");
+ Process process((ProcessCommand(command)));
+ process
+ .send_input_to_fd(ser_stream, -1, "PALUDIS_SERIALISED_RESOLUTION_FD")
+ .as_main_process();
- become_command(cmd);
+ int retcode(process.run().wait());
+ _exit(retcode);
}
else
return ExecuteResolutionCommand().run(env, args, resolved->job_lists());