aboutsummaryrefslogtreecommitdiff
path: root/okupy
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-08-22 13:37:25 +0200
committerMichał Górny <mgorny@gentoo.org>2013-08-25 10:51:02 +0200
commit8a41c0dcf9731fbdc151b362a5694c793acf43c0 (patch)
treebf3c7e14ff8d3629c81ebfff4e5b4d5ac085d208 /okupy
parentIntroduce the concept of auth handlers. (diff)
downloadidentity.gentoo.org-8a41c0dcf9731fbdc151b362a5694c793acf43c0.tar.gz
identity.gentoo.org-8a41c0dcf9731fbdc151b362a5694c793acf43c0.tar.bz2
identity.gentoo.org-8a41c0dcf9731fbdc151b362a5694c793acf43c0.zip
Reset RNG in @postfork.
Diffstat (limited to 'okupy')
-rw-r--r--okupy/wsgi.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/okupy/wsgi.py b/okupy/wsgi.py
index da73254..de75c8f 100644
--- a/okupy/wsgi.py
+++ b/okupy/wsgi.py
@@ -46,8 +46,14 @@ else:
from okupy.common.ssh import ssh_main
+ import Crypto.Random
+
postfork(thread(ssh_main))
+ @postfork
+ def reset_rng():
+ Crypto.Random.atfork()
+
@timer(5)
def change_code_gracefull_reload(sig):
if autoreload.code_changed():