Skip to content

Test posix_kill_pidoverflow depends on pcntl but not skipped if it's disabled #19381

@fuhsnn

Description

@fuhsnn

Description

The said test uses SIGTERM:

try {
posix_kill(PHP_INT_MAX, SIGTERM);
} catch (\ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}

which I believe is only a predefined constant if pcntl module is built.

The context is ./configure doesn't know slimcc, the C compiler I work on, so pcntl wasn't enabled by default, and the test failed with Fatal error: Uncaught Error: Undefined constant "SIGTERM" before reaching the expected exception.
I re-configured PHP with --enable-pcntl and the pass passed.

PHP Version

PHP 8.5.0alpha4 (cli)

Operating System

Debian 12 x86-64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions