Skip to content

Commit b0a8a5e

Browse files
hiryu85dereuromark
andauthored
FIX: issue #431 (#432)
* Fix issue #431 * docblock * SIGTERM is used only if no value of $sig is specified * dereuromark's suggestion Co-authored-by: Mark Scherer <dereuromark@users.noreply.github.com> * default $sig code = 0 * ?int => int * update docblock signature --------- Co-authored-by: Mark Scherer <dereuromark@users.noreply.github.com>
1 parent 0a25531 commit b0a8a5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Model/Table/QueueProcessesTable.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,16 @@ public function endProcess(string $pid): void {
290290
*
291291
* @return void
292292
*/
293-
public function terminateProcess(string $pid, int $sig = SIGTERM): void {
293+
public function terminateProcess(string $pid, int $sig = 0): void {
294294
if (!$pid) {
295295
return;
296296
}
297297

298+
// In the Windows operating system the SIGTERM constant is not defined
299+
if (!$sig && defined('SIGTERM')) {
300+
$sig = \SIGTERM;
301+
}
302+
298303
$killed = false;
299304
if (function_exists('posix_kill')) {
300305
$killed = posix_kill((int)$pid, $sig);

0 commit comments

Comments
 (0)