`devproxy --detach` blocks callers that capture its output

Offen
#2,080 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@waldekmastykarz arbeitet bereits daran.

Seit 05.11.2026.

  • #2094 von @waldekmastykarz — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

work in progress

Problem

On Windows, the agent ran:

devproxy --detach --no-first-run -c ..\devproxy\devproxyrc.json 2>&1 | Out-String

The command never returned: no output after 45 s, and the shell had to be killed. Dev Proxy itself was running. The agent abandoned --detach and wrote its own background-spawn logic.

The daemon is started with RedirectStandardOutput/Error = true (Program.cs). Likely cause: the detached child inherits the caller's pipe handles, so anything that reads the parent's output to EOF waits for the daemon to exit. This affects | Out-String, $(devproxy --detach) in bash, and subprocess or execSync with pipes. Not yet confirmed on macOS or Linux.

Proposal

  • Start the daemon with stdio fully detached (null, or the log file) and without inheriting the caller's handles.
  • Make sure the parent prints its startup info (PID, URLs, log file) and exits immediately.
  • Add an integration test that runs devproxy --detach through a captured pipe with a timeout. The existing ProcessSmokeTests cover --detach, but not with captured output.

Found while evaluating how coding agents use Dev Proxy: VS Code + GitHub Copilot Chat with Claude Sonnet 5.5, Dev Proxy 4.0.0 on Windows, 5 runs of the task "add a CI script that starts Dev Proxy in the background, starts and stops recording through the API around npm start, and shuts Dev Proxy down through the API".

Vorherrschende Sprache
C#
Sterne
841
Forks
90
Ø Merge
2 T. 10 Std.
Gemergte PRs (30 T.)
63

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus dotnet/dev-proxy

Alle Issues in dotnet/dev-proxy

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.