diff options
-rw-r--r-- | src/lib/entropy/unix_procs/unix_procs.cpp | 21 |
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); |