-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-16800: ftp functions can abort with EINTR
This adds wrappers around recv(), send(), and php_pollfd_for_ms() to handle EINTR. This is a bit hard to test on its own, but it is testable manually using the following script: ```php pcntl_signal(SIGUSR1, function() { var_dump(func_get_args()); }, false); var_dump(getmypid()); sleep(10); $ftp = ftp_connect('127.0.0.1'); ftp_login($ftp, 'user', 'pass'); ftp_put($ftp, 'testfile', 'testfile'); ``` in combination with an infinite while loop that sends SIGUSR1 to the process. Closes GH-17327.
- Loading branch information
Showing
2 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters