[php-src] PR #24377: Fix posix_setrlimit() rejecting POSIX_RLIMIT_INFINITY on Solaris

From: Date: Fri, 16 Oct 2026 19:29:48 +0000
Subject: [php-src] PR #24377: Fix posix_setrlimit() rejecting POSIX_RLIMIT_INFINITY on Solaris
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39512@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24377 Author: jorgsowa GH-19281 made posix_setrlimit() throw a ValueError for limits below -1, on the assumption that -1 (RLIM_INFINITY on Linux) is the only valid negative value. Solaris defines RLIM_INFINITY as (rlim_t)-3, so the function now rejects PHP's own POSIX_RLIMIT_INFINITY constant. On Solaris, also accept RLIM_INFINITY. Other platforms keep the existing check. The error message is kept the same (or maybe I should change the wording as well?) This fixes [ext/session/tests/session_write_failure_keeps_data.phpt](https://github.com/php/php-src/actions/runs/38834952378/job/116762113649#step:3:2215) in the nightly SOLARIS job. Why it started failing recently? Because the test was added yesterday https://github.com/php/php-src/commit/c2b02f24dff and it's using posix_setrlimit() See https://docs.oracle.com/cd/E88353_01/html/E37841/setrlimit-2.html and https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/resource.h

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