Skip to content

Commit

Permalink
fix linux64 running flag
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Dec 13, 2021
1 parent 4a01b3e commit 3326631
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/signals-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,11 @@ JL_DLLEXPORT int jl_profile_start_timer(void)
itsprof.it_interval.tv_nsec = 0;
itsprof.it_value.tv_sec = nsecprof / GIGA;
itsprof.it_value.tv_nsec = nsecprof % GIGA;
if (timer_settime(timerprof, 0, &itsprof, NULL) == -1)
running = 1; // Set this before so that we know that the first SIGUSR1 came from the timer
if (timer_settime(timerprof, 0, &itsprof, NULL) == -1) {
running = 0;
return -3;
running = 1;
}
return 0;
}

Expand All @@ -550,9 +552,11 @@ JL_DLLEXPORT int jl_profile_start_timer(void)
timerprof.it_interval.tv_usec = 0;
timerprof.it_value.tv_sec = nsecprof / GIGA;
timerprof.it_value.tv_usec = ((nsecprof % GIGA) + 999) / 1000;
if (setitimer(ITIMER_PROF, &timerprof, NULL) == -1)
running = 1; // Set this before so that we know that the first SIGUSR1 came from the timer
if (setitimer(ITIMER_PROF, &timerprof, NULL) == -1) {
running = 0;
return -3;
running = 1;
}
return 0;
}

Expand Down

0 comments on commit 3326631

Please sign in to comment.