Skip to content

ftp functions can abort with EINTR #16800

Closed
@bwoebi

Description

@bwoebi

Description

The underlying cause is poll(2) syscalls in the ext/ftp code (poll is one of those syscalls which cannot be resumed via SA_RESTART).
Short of guarding every single ftp operation, there's no way to cleanly resume ftp processing.
Especially given that the ext/ftp operations are sometimes big operations - like, I don't really have certainty on whether a transfer properly happened or not, I just know it was aborted.

my_send() and my_recv() in the ftp code both call php_pollfd_for_ms() and immediately abort on any non-zero return instead of retrying on EINTR.
The ext/ftp operations are high-level enough that they should handle EINTR themselves and resume accordingly.

PHP Version

PHP 8.3.13

Operating System

No response

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