Created
May 27, 2014 00:49
-
-
Save aplund/81b79551cc15be2d9095 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 363ce14e92f96a1207235391412331e2fc55680a | |
Author: Austin Lund <[email protected]> | |
Date: Tue May 27 10:47:47 2014 +1000 | |
Change profiler to use SIGUSR2. | |
It appears that some libraries mask SIGUSR1 for their own purposes. | |
This solution is a bit of a hack, but it does allow the profiler to | |
work in some more situations than currently. | |
diff --git a/src/profile.c b/src/profile.c | |
index 33ab317..8c410cb 100644 | |
--- a/src/profile.c | |
+++ b/src/profile.c | |
@@ -358,13 +358,13 @@ DLLEXPORT int jl_profile_start_timer(void) | |
sa.sa_flags = SA_SIGINFO; | |
sa.sa_sigaction = profile_bt; | |
sigemptyset(&sa.sa_mask); | |
- if (sigaction(SIGUSR1, &sa, NULL) == -1) | |
+ if (sigaction(SIGUSR2, &sa, NULL) == -1) | |
return -1; | |
// Establish the signal event | |
memset(&sigprof, 0, sizeof(struct sigevent)); | |
sigprof.sigev_notify = SIGEV_SIGNAL; | |
- sigprof.sigev_signo = SIGUSR1; | |
+ sigprof.sigev_signo = SIGUSR2; | |
sigprof.sigev_value.sival_ptr = &timerprof; | |
if (timer_create(CLOCK_REALTIME, &sigprof, &timerprof) == -1) | |
return -2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment