php-src/ext/ftp
Niels Dossche 412a6b2e08
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.
2025-01-03 12:30:43 +01:00
..
tests Merge branch 'PHP-8.1' into PHP-8.2 2023-07-07 17:59:00 +02:00
config.m4 Fix bug #79112: IMAP can't find OpenSSL during configure 2020-01-20 09:59:27 +01:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
ftp.c Fix GH-16800: ftp functions can abort with EINTR 2025-01-03 12:30:43 +01:00
ftp.h Fix GH-9348: FTP & SSL session reuse 2023-12-03 00:47:33 +01:00
ftp.stub.php Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 21:12:04 +00:00
ftp_arginfo.h Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 21:12:04 +00:00
php_ftp.c Merge branch 'PHP-8.2' 2023-03-03 15:26:51 +01:00
php_ftp.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00