Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: 
Changeset: r78367:0625f86a9ae6
Date: 2015-06-30 19:00 +0200
http://bitbucket.org/pypy/pypy/changeset/0625f86a9ae6/

Log:    port the changes from upstream

diff --git a/pypy/module/_vmprof/src/vmprof.c b/pypy/module/_vmprof/src/vmprof.c
--- a/pypy/module/_vmprof/src/vmprof.c
+++ b/pypy/module/_vmprof/src/vmprof.c
@@ -316,11 +316,15 @@
 }
 
 static void atfork_disable_timer(void) {
-    remove_sigprof_timer();
+    if (last_period_usec) {
+        remove_sigprof_timer();
+    }
 }
 
 static void atfork_enable_timer(void) {
-    install_sigprof_timer(last_period_usec);
+    if (last_period_usec) {
+        install_sigprof_timer(last_period_usec);
+    }
 }
 
 static int install_pthread_atfork_hooks(void) {
@@ -411,6 +415,7 @@
     if (remove_sigprof_timer() == -1) {
                return -1;
        }
+    last_period_usec = 0;
     if (remove_sigprof_handler() == -1) {
                return -1;
        }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to