Statprof restores previous sigprof handler when stopping
authorAndy Wingo <wingo@pobox.com>
Fri, 28 Feb 2014 10:17:37 +0000 (11:17 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 28 Feb 2014 16:17:46 +0000 (17:17 +0100)
commit3072d7624f5f675db46f338927d44c0d28b5f6a6
tree7765a16c279934c052fcaa90e78a8354fce3df44
parent91db6c4f9c32f3be30da4f7b9993c75e2ac0813c
Statprof restores previous sigprof handler when stopping

* module/statprof.scm (<state>): Add field for the previous SIGPROF
  handler.
  (statprof-start, statprof-stop, statprof-reset): Instead of setting
  the SIGPROF handler in statprof-reset, set it when the profiler
  becomes active, and actually restore it when the profiler becomes
  inactive.
module/statprof.scm