Skip to content

Require poll() for UNIX based OSs and improve emulation for Windows #15532

Open

Description

@Girgias

Description

This would allow some simplification of the php_network.h header and of our emulation layer.

Initially found while working on #15511

Activity

  1. cmb69 commented on Aug 22, 2024

    @cmb69
    Member

    Makes sense to do this, but unless we are absolutely sure that all non Windows we are supporting support poll(), maybe it's better to postpone that to PHP next (8.5 or 9.0).

  2. Girgias commented on Aug 22, 2024

    @Girgias
    MemberAuthor

    This is definitely not urgent, the point of the issue is to have a reminder somewhere of this!

    I also think it is better to wait for the next release as we're already in beta, and I am a bit vary to change such an aspect.

  3. Girgias commented on Mar 26, 2026

    @Girgias
    MemberAuthor

    Just rediscovered this, maybe @petk has any knowledge about the availability of poll on other platforms?

  4. petk commented on Mar 26, 2026

    @petk
    Member

    It's widely available. In practice it won't be possible to find a POSIX system without it.

    It was once part of the XSI (so some systems lacked it - some very old Solaris versions probably, IRIX, some very old BSD-based systems and similar) but now it is moved to base POSIX:
    https://pubs.opengroup.org/onlinepubs/9799919799/functions/poll.html

    I'm also collecting all such similar POSIX functionality here: https://github.com/petk/php-build-system/blob/8af7cf3d50b738764d5cd2aa22f3775174796f13/cmake/cmake/platforms/Unix.cmake
    for which it can be assumed that they are available on all POSIX systems. If I find some system that where it would be still relevant to check all of these, I'll notice it sooner or later.

  5. bukka commented on Nov 1, 2026

    @bukka
    Member

    It's also now required since PHP Poll API - meaning PHP won't build on non Windows platform if poll is not available. So this can be closed...

  6. bukka commented on Nov 1, 2026

    @bukka
    Member

    Well I will leave it open as there is that note about improving emulation and maybe some clean up could be done too...

  7. reopened this on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions