mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 06:03:18 +08:00
Give background children an empty stdin so Vite stops eating shell keystrokes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
96244daba7
commit
4c4c7d91d0
1 changed files with 9 additions and 0 deletions
|
|
@ -53,6 +53,10 @@ $bizStateWorkerPidDir = Join-Path $runDir "biz_state_workers"
|
||||||
$webPidFile = Join-Path $runDir "web.pid"
|
$webPidFile = Join-Path $runDir "web.pid"
|
||||||
$webLogFile = Join-Path $runDir "web.out.log"
|
$webLogFile = Join-Path $runDir "web.out.log"
|
||||||
$webErrFile = Join-Path $runDir "web.err.log"
|
$webErrFile = Join-Path $runDir "web.err.log"
|
||||||
|
# Children share this console; give them an empty stdin so Vite (raw-mode CLI shortcuts)
|
||||||
|
# and python cannot steal keystrokes from the shell that launched them.
|
||||||
|
$nullStdin = Join-Path $runDir "stdin.empty"
|
||||||
|
if (-not (Test-Path -LiteralPath $nullStdin)) { New-Item -ItemType File -Path $nullStdin -Force | Out-Null }
|
||||||
|
|
||||||
$venvPython = Join-Path $projectRoot ".venv\Scripts\python.exe"
|
$venvPython = Join-Path $projectRoot ".venv\Scripts\python.exe"
|
||||||
if (Get-Command Test-NetxVenvRunnable -ErrorAction SilentlyContinue) {
|
if (Get-Command Test-NetxVenvRunnable -ErrorAction SilentlyContinue) {
|
||||||
|
|
@ -184,6 +188,7 @@ function Start-NetxWorker {
|
||||||
-ArgumentList @("-m", "netx_api.worker") `
|
-ArgumentList @("-m", "netx_api.worker") `
|
||||||
-WorkingDirectory $projectRoot `
|
-WorkingDirectory $projectRoot `
|
||||||
-WindowStyle Hidden `
|
-WindowStyle Hidden `
|
||||||
|
-RedirectStandardInput $nullStdin `
|
||||||
-RedirectStandardOutput $outLog `
|
-RedirectStandardOutput $outLog `
|
||||||
-RedirectStandardError $errLog `
|
-RedirectStandardError $errLog `
|
||||||
-PassThru
|
-PassThru
|
||||||
|
|
@ -228,6 +233,7 @@ function Start-BizStateWorkers {
|
||||||
-ArgumentList @("-m", "netx_api.biz_state_worker") `
|
-ArgumentList @("-m", "netx_api.biz_state_worker") `
|
||||||
-WorkingDirectory $projectRoot `
|
-WorkingDirectory $projectRoot `
|
||||||
-WindowStyle Hidden `
|
-WindowStyle Hidden `
|
||||||
|
-RedirectStandardInput $nullStdin `
|
||||||
-RedirectStandardOutput $outLog `
|
-RedirectStandardOutput $outLog `
|
||||||
-RedirectStandardError $errLog `
|
-RedirectStandardError $errLog `
|
||||||
-PassThru
|
-PassThru
|
||||||
|
|
@ -251,6 +257,7 @@ if ($Background) {
|
||||||
-ArgumentList @("-m", "netx_api.main") `
|
-ArgumentList @("-m", "netx_api.main") `
|
||||||
-WorkingDirectory $projectRoot `
|
-WorkingDirectory $projectRoot `
|
||||||
-WindowStyle Hidden `
|
-WindowStyle Hidden `
|
||||||
|
-RedirectStandardInput $nullStdin `
|
||||||
-RedirectStandardOutput $logFile `
|
-RedirectStandardOutput $logFile `
|
||||||
-RedirectStandardError $errFile `
|
-RedirectStandardError $errFile `
|
||||||
-PassThru
|
-PassThru
|
||||||
|
|
@ -293,6 +300,7 @@ if ($Background) {
|
||||||
-ArgumentList @("run", "dev", "--", "--host", $BindHost, "--port", "$WebPort") `
|
-ArgumentList @("run", "dev", "--", "--host", $BindHost, "--port", "$WebPort") `
|
||||||
-WorkingDirectory $webRoot `
|
-WorkingDirectory $webRoot `
|
||||||
-WindowStyle Hidden `
|
-WindowStyle Hidden `
|
||||||
|
-RedirectStandardInput $nullStdin `
|
||||||
-RedirectStandardOutput $webLogFile `
|
-RedirectStandardOutput $webLogFile `
|
||||||
-RedirectStandardError $webErrFile `
|
-RedirectStandardError $webErrFile `
|
||||||
-PassThru
|
-PassThru
|
||||||
|
|
@ -332,6 +340,7 @@ if ($WithWeb) {
|
||||||
-ArgumentList @("run", "dev", "--", "--host", $BindHost, "--port", "$WebPort") `
|
-ArgumentList @("run", "dev", "--", "--host", $BindHost, "--port", "$WebPort") `
|
||||||
-WorkingDirectory $webRoot `
|
-WorkingDirectory $webRoot `
|
||||||
-WindowStyle Hidden `
|
-WindowStyle Hidden `
|
||||||
|
-RedirectStandardInput $nullStdin `
|
||||||
-RedirectStandardOutput $webLogFile `
|
-RedirectStandardOutput $webLogFile `
|
||||||
-RedirectStandardError $webErrFile `
|
-RedirectStandardError $webErrFile `
|
||||||
-PassThru
|
-PassThru
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue