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

Abierto
#2,080 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@waldekmastykarz ya está trabajando en esto.

Desde el 5/11/2026.

  • #2094 de @waldekmastykarz — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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".

Lenguaje dominante
C#
Estrellas
841
Forks
90
Merge medio
2 d 10 h
PR fusionados (30 d)
63

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/dev-proxy

Todos los issues de dotnet/dev-proxy

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.