aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-18 10:14:59 +0000
committerlloyd <[email protected]>2015-03-18 10:14:59 +0000
commit4a228791220ac7340da4ca95e98d19d3c03eeb31 (patch)
treea2924cef2bf62a5fdcf22be08feda434f6385cd2 /src
parent1c5c28f2e8a605c0429bacd49fc8cacbbb50377a (diff)
This check doesn't make sense as the entropy source is shared
Diffstat (limited to 'src')
-rw-r--r--src/lib/entropy/unix_procs/unix_procs.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/lib/entropy/unix_procs/unix_procs.cpp b/src/lib/entropy/unix_procs/unix_procs.cpp
index 1cc93741c..d9aa787cf 100644
--- a/src/lib/entropy/unix_procs/unix_procs.cpp
+++ b/src/lib/entropy/unix_procs/unix_procs.cpp
@@ -68,21 +68,12 @@ Unix_EntropySource::Unix_EntropySource(const std::vector<std::string>& trusted_p
void UnixProcessInfo_EntropySource::poll(Entropy_Accumulator& accum)
{
- static std::atomic<int> last_pid;
-
- int pid = ::getpid();
-
- accum.add(pid, 0.0);
-
- if(pid != last_pid)
- {
- last_pid = pid;
- accum.add(::getppid(), 0.0);
- accum.add(::getuid(), 0.0);
- accum.add(::getgid(), 0.0);
- accum.add(::getsid(0), 0.0);
- accum.add(::getpgrp(), 0.0);
- }
+ accum.add(::getpid(), 0.0);
+ accum.add(::getppid(), 0.0);
+ accum.add(::getuid(), 0.0);
+ accum.add(::getgid(), 0.0);
+ accum.add(::getsid(0), 0.0);
+ accum.add(::getpgrp(), 0.0);
struct ::rusage usage;
::getrusage(RUSAGE_SELF, &usage);