base: make System.IO.openTempFile generate less predictable names
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 28 Jul 2014 12:59:36 +0000 (07:59 -0500)
committerAustin Seipp <austin@well-typed.com>
Mon, 28 Jul 2014 14:29:19 +0000 (09:29 -0500)
commitf510c7cac5b2e9afe0ebde2766a671c59137f3cc
treefe7d8cd3c231af6a344e43dcd01d8c77aae2e0af
parentb126ad3f59a62f91b2e2d92ec9d51d245861b655
base: make System.IO.openTempFile generate less predictable names

It basically changes

    prefix ++ getpid() ++ seq_no ++ suffix

for

    prefix ++ rand() ++ rand() ++ suffix

Which make any call to 'openTempFile' finish without loops.

Bug-report: https://ghc.haskell.org/trac/ghc/ticket/9058
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
libraries/base/System/IO.hs