Skip to content
  1. Mar 12, 2014
  2. Feb 27, 2014
  3. Feb 10, 2014
  4. Feb 09, 2014
  5. Jan 28, 2014
  6. Jan 26, 2014
  7. Jul 11, 2013
  8. Jul 04, 2013
  9. Mar 05, 2013
  10. Mar 01, 2013
    • Jason Miller's avatar
      Implement in-process PRNG for mkostemp · 88eb09b2
      Jason Miller authored and Stelian Ionescu's avatar Stelian Ionescu committed
      Instead of using /dev/urandom, use an in-process 32-bit xorshift.
      
      The xorshift is a very fast but not particularly strong PRNG with a
      period of (1- (expt 2 32)).  It has only a single 32-bit word for seed
      data, so that multithreaded code should play very nicely on CPUs that
      can store those atomically.  For CPUs that cannot, it should still be
      safe, since it can recover from any value in the seed.
      
      We reseed from the pid and current time when we hit a collision.  This
      is necessary for code like this to not be slow:
      
          mkstemp(...)
          fork()
          mkstemp(...)
      
      since the child process(es) will inherit the seed of the parent and
      collide a lot otherwise.
      88eb09b2
    • Stelian Ionescu's avatar
      Require ptsname(), remove workaround · 0d07b344
      Stelian Ionescu authored
      0d07b344
  11. Feb 27, 2013