Skip to content

IBM i PASE doesn't support ITIMER_PROF #6503

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

Closed
wants to merge 2 commits into from

Conversation

NattyNarwhal
Copy link
Member

Like Cygwin, this platform needs to use a real-time timer.

This was based on a patch by @kadler, but it didn't handle unsetting
the timer, so the timeout would continue to be active, triggering
hard_timeout unexpectedly. The patch is fixed to handle unsetting.

Like Cygwin, this platform needs to use a real-time timer.

This was based on a patch by @kadler, but it didn't handle unsetting
the timer, so the timeout would continue to be active, triggering
`hard_timeout` unexpectedly. The patch is fixed to handle unsetting.
@kadler
Copy link
Contributor

kadler commented Dec 10, 2020

Thanks for fixing and pushing upstream!

@nikic
Copy link
Member

nikic commented Dec 10, 2020

Maybe base this off #ifndef ITIMER_PROF instead, to avoid the need to hardcode systems?

@kadler
Copy link
Contributor

kadler commented Dec 10, 2020

@nikic The problem with that is that ITIMER_PROF is actually defined on PASE. Arguably, a bug in PASE

@NattyNarwhal
Copy link
Member Author

Yes, it's defined in AIX because it works there and PASE includes the AIX headers, even for functionally i doesn't implement. In this case, it doesn't, since I'm pretty sure the AIX syscall gets redirected to that function.

It might be done with an autoconf test provided it returns ENOSYS or something though.

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, in that case this looks fine to me.

@kocsismate
Copy link
Member

I'm currently working on something related, so I'm wondering if the conditions around TIMEOUT_SIG defined in zend_signal.c should be adapted as well?

@NattyNarwhal
Copy link
Member Author

I'm currently working on something related, so I'm wondering if the conditions around TIMEOUT_SIG defined in zend_signal.c should be adapted as well?

Oh, I wasn't aware of this. It'd make sense, because then that file would be unaware of handlers installed onto SIGALARM. I'll patch for this too.

@php-pulls php-pulls closed this in 54248b1 Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants