Skip to content

Commit

Permalink
hardcode signal values for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
medilies committed Aug 7, 2024
1 parent 072f94c commit a9728c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Dompurify/DompurifyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public function throwIfFailedOnTerm(): void
throw new XsslessException('The service is still running');
}

if ($this->serviceProcess->getTermSignal() === SIGTERM) {
dump($this->serviceProcess->getTermSignal());
if ($this->serviceProcess->getTermSignal() === 15) { // SIGTERM
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/laravel/Commands/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function handle(): void
exit;
};

pcntl_signal(SIGTERM, $terminate);
pcntl_signal(SIGINT, $terminate);
pcntl_signal(15, $terminate); // SIGTERM
pcntl_signal(2, $terminate); // SIGINT

while ($service->isRunning()) {
$output = $service->getIncrementalOutput();
Expand Down
2 changes: 1 addition & 1 deletion tests/ArchTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

arch('it will not use debugging functions')
->expect(['dd', 'dump', 'ray'])
->expect(['dd', 'ray'])
->each->not->toBeUsed();

0 comments on commit a9728c3

Please sign in to comment.