Skip to content

Commit 1c4e98c

Browse files
Merge branch 'main' into af-fix-ngrok
2 parents 0e952e2 + 7650203 commit 1c4e98c

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

config/solo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
'Make' => new MakeCommand,
5353
// 'HTTP' => 'php artisan serve',
5454

55-
// Lazy commands do no automatically start when Solo starts.
55+
// Lazy commands do not automatically start when Solo starts.
5656
'Dumps' => Command::from('php artisan solo:dumps')->lazy(),
5757
'Reverb' => Command::from('php artisan reverb:start --debug')->lazy(),
5858
'Pint' => Command::from('./vendor/bin/pint --ansi')->lazy(),

src/Commands/Concerns/ManagesProcess.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,14 @@ public function stop(): void
244244
// Keep track of when we tried to stop.
245245
$this->stopInitiatedAt ??= Carbon::now();
246246

247-
// Ask for a graceful shutdown. If it isn't
248-
// respected, we'll force kill it later.
249-
$this->process->signal(SIGTERM);
247+
foreach ($this->children as $pid) {
248+
$command = trim(shell_exec("ps -o command= -p $pid"));
249+
250+
// If it doesn't contain 'screen' or 'SCREEN', it's likely our actual command
251+
if (!Str::startsWith($command, 'screen') && !Str::startsWith($command, 'SCREEN')) {
252+
posix_kill((int) $pid, SIGTERM);
253+
}
254+
}
250255
}
251256
}
252257

src/Support/Frames.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
22

3-
/**
4-
* @author Aaron Francis <[email protected]>
5-
*
6-
* @link https://aaronfrancis.com
7-
* @link https://twitter.com/aarondfrancis
8-
*/
9-
103
declare(strict_types=1);
114

125
/**

src/Support/KeyPressListener.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?php
22

33
/**
4-
* @author Aaron Francis <[email protected]|https://twitter.com/aarondfrancis>
4+
* @author Aaron Francis <[email protected]>
5+
*
6+
* @link https://aaronfrancis.com
7+
* @link https://x.com/aarondfrancis
58
*/
69

710
namespace SoloTerm\Solo\Support;

workbench/config/solo.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?php
22

33
/**
4-
* @author Aaron Francis <[email protected]|https://twitter.com/aarondfrancis>
4+
* @author Aaron Francis <[email protected]>
5+
*
6+
* @link https://aaronfrancis.com
7+
* @link https://x.com/aarondfrancis
58
*/
69

710
use SoloTerm\Solo\Commands\Command;

0 commit comments

Comments
 (0)