Skip to content

Commit 62e8dcb

Browse files
committed
Change parameter default to always available value
`SIGTERM` is only defined in ext/pcntl, and as such never available on Windows. Moving the constant to ext/standard does not make much sense, because that parameter is actually unused on Windows. Therefore, we use the magic number `15` instead, what is also done in the PHP manual.
1 parent 87ba975 commit 62e8dcb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ function proc_open($cmd, array $descriptorspec, &$pipes, ?string $cwd = null, ?a
11751175
function proc_close($process): int {}
11761176

11771177
/** @param resource $process */
1178-
function proc_terminate($process, int $signal = SIGTERM): bool {}
1178+
function proc_terminate($process, int $signal = 15): bool {}
11791179

11801180
/** @param resource $process */
11811181
function proc_get_status($process): array {}

ext/standard/basic_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ ZEND_END_ARG_INFO()
18051805
#if defined(PHP_CAN_SUPPORT_PROC_OPEN)
18061806
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_proc_terminate, 0, 1, _IS_BOOL, 0)
18071807
ZEND_ARG_INFO(0, process)
1808-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "SIGTERM")
1808+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, signal, IS_LONG, 0, "15")
18091809
ZEND_END_ARG_INFO()
18101810
#endif
18111811

0 commit comments

Comments
 (0)