aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-09 03:30:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-09 03:30:54 +0000
commita8a56bd2aff1012d3f7471482162dc8c2d655125 (patch)
tree383632fc0dd58fbaa250e44af2813074dc5568fa
parent934b1264385f780e997e7bb895ea0b98c13fc1cb (diff)
downloadpaludis-a8a56bd2aff1012d3f7471482162dc8c2d655125.tar.gz
paludis-a8a56bd2aff1012d3f7471482162dc8c2d655125.tar.xz
Tinker a bit
-rw-r--r--paludis/util/system.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index bd1d616..480251e 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -45,6 +45,8 @@ namespace
static int stderr_write_fd = -1;
static int stderr_close_fd = -1;
+ static pid_t paludis_pid(getpid());
+
/**
* Runs a command in a directory if needed, wait for it to terminate
* and return its exit status.
@@ -58,7 +60,7 @@ namespace
if (! done_paludis_pid)
{
if (getenv_with_default("PALUDIS_PID", "").empty())
- setenv("PALUDIS_PID", stringify(getpid()).c_str(), 1);
+ setenv("PALUDIS_PID", stringify(paludis_pid).c_str(), 1);
done_paludis_pid = true;
}