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

Ouverte
#3 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
40/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
bash, typescript, zsh
Domaine
tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
54
Forks
4
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de githubnext/superego

Toutes les issues de githubnext/superego

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.