spawnGroup: option to run in the user's login shell

Abierto
#3 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
40/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
bash, typescript, zsh
Área
tooling

Línea de trabajo

Start with spawnGroup and the run extension, which already prefixes set +m; trap 'exit 143' TERM; to work around job control and SIGTERM handling. Then find the user-shell helper inside the terminal extension and decide whether to export it or add a shell: 'login' option. Done means a command spawned with the login-shell option sees the user's PATH and aliases, background jobs stop with the group, and loops exit on SIGTERM. The maintainers have not picked between the two API options, so confirm that before writing code.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Running a command the way the user's terminal would (PATH, aliases) via spawnGroup is easy to get wrong:

  • zsh -l -c alone doesn't load the user's PATH here; -l -i -c does.
  • But an interactive shell enables job control, so background jobs get their own process group and escape a group stop.
  • Interactive shells ignore SIGTERM, so a loop only dies at the SIGKILL after the grace period.

The run extension prefixes set +m; trap 'exit 143' TERM; to fix both. The terminal extension already has a user-shell helper internally; exposing it, or a shell: 'login' option on spawnGroup, would save every extension from rediscovering this.

Lenguaje dominante
TypeScript
Estrellas
44
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 githubnext/superego

Todos los issues de githubnext/superego

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.