[php-src] PR #14452: Updated the stream_select() function so that it supports bigger file …

From: Date: Mon, 03 Jun 2024 10:00:37 +0000
Subject: [php-src] PR #14452: Updated the stream_select() function so that it supports bigger file …
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-26512@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/14452 Author: frodeborli Updated the stream_select() function so that it supports bigger file descriptor numbers without recompiling PHP on non-Windows OS, by passing the select() system call dynamically generated fd_sets with a custom fd_bigset struct type. The select() system call supports unlimited numbers of file descriptors technically, and so should all BSD derived unix operating systems. The perceived limitation of the select() system call to support only 1024 file descriptors is because of the fd_set structure being prebuilt to FD_SETSIZE length, but the kernel supports unlimited. The new version of this function allocates memory on the heap to build an fd_bigset which is passed to the select() system call, and then frees the structures. I decided to leave the functions stream_array_to_fd_set and stream_array_from_fd_set functions in streamfuncs.c in case somebody is using that. I did not change the php_select macro, only the stream_select function.

« previous php.git-pulls (#26512) next »