-
-
Couldn't load subscription status.
- Fork 5.7k
Use the POSIX timers API rather than itimer on FreeBSD #49072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
POSIX.1-2008 marks `getitimer`/`setitimer` obsolete in favor of `timer_gettime`/`timer_settime`. Additionally, POSIX.1-2017 marks `SIGPROF` obsolete. Thus we can make simply have FreeBSD use the same signals code paths as Linux, which already uses the timer API and uses `SIGUSR1` rather than `SIGPROF`. The code conditional on the `HAVE_ITIMER` flag, as well as the flag itself, have been removed since they're no longer used.
|
Weird, I did not get this locally: |
|
We've seen that error on other platforms as well. CC @gbaraldi |
|
Yeah, we usually get a segfault here when it errors, but it seems we got a sigabrt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to use SIGPROF still, via setting:
sigprof.sigev_signo = SIGPROF;
Nah, might as well just follow suit with what Linux is doing and use
Which ones? Is it sporadic or consistent? (I assume sporadic given that CI passed on other platforms in this PR.) We could try rerunning the FreeBSD tests and see whether it happens again.
Huh. Well, I guess this isn't worse at least... |
|
The |
|
I opened an issue about the |
POSIX.1-2008 marks `getitimer`/`setitimer` obsolete in favor of `timer_gettime`/`timer_settime`. Additionally, POSIX.1-2017 marks `SIGPROF` obsolete. Thus we can make simply have FreeBSD use the same signals code paths as Linux, which already uses the timer API and uses `SIGUSR1` rather than `SIGPROF`. The code conditional on the `HAVE_ITIMER` flag, as well as the flag itself, have been removed since they're no longer used.
POSIX.1-2008 marks
getitimer/setitimerobsolete in favor oftimer_gettime/timer_settime. Additionally, POSIX.1-2017 marksSIGPROFobsolete. Thus we can make simply have FreeBSD use the same signals code paths as Linux, which already uses the timer API and usesSIGUSR1rather thanSIGPROF. The code conditional on theHAVE_ITIMERflag, as well as the flag itself, have been removed since they're no longer used.Inexplicably fixes #48714 for me.