fix signal handler context switch
Merge pull request #245 from LudwigOrtmann/fix_tramp

fix signal handler context switch