aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-07-31 20:32:58 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-07-31 20:32:58 +0000
commit7e614e0bcdb4730761aea814dcecc2b801514bd0 (patch)
tree89151a7b7aeef25d369f0f9b540b17c2f696ca5d
parent0aaa1674486394521e6e3172b116ef7bfbb605e6 (diff)
downloadpaludis-7e614e0bcdb4730761aea814dcecc2b801514bd0.tar.gz
paludis-7e614e0bcdb4730761aea814dcecc2b801514bd0.tar.xz
Really don't use Log after a fork().
-rw-r--r--paludis/util/pstream.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/paludis/util/pstream.cc b/paludis/util/pstream.cc
index 3f7092a..c6750a1 100644
--- a/paludis/util/pstream.cc
+++ b/paludis/util/pstream.cc
@@ -67,8 +67,7 @@ PStreamInBuf::underflow()
}
PStreamInBuf::PStreamInBuf(const Command & cmd) :
- _command(cmd),
- child(fork())
+ _command(cmd)
{
Context context("When running command '" + stringify(cmd.command()) + "' asynchronously:");
@@ -98,6 +97,8 @@ PStreamInBuf::PStreamInBuf(const Command & cmd) :
cmd.echo_to_stderr();
Log::get_instance()->message(ll_debug, lc_no_context, "execl /bin/sh -c " + c + " " + extras);
+ child = fork();
+
if (0 == child)
{
try