Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional support to replace argv[0] (fixes #472) #627

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattieb
Copy link

@mattieb mattieb commented Aug 31, 2023

Fixes #472.

With this, specifying the new property "argv0" in options will replace argv[0] with a custom string.

This is useful, for example, when starting a login shell:

const pty = spawn('/bin/zsh', [], {
  argv0: '-zsh'
});

If this property is omitted, the file parameter is used instead, which is identical to existing behavior.

@mattieb
Copy link
Author

mattieb commented Aug 31, 2023

@microsoft-github-policy-service agree

@mattieb
Copy link
Author

mattieb commented Oct 22, 2023

Hey y’all, let me know if anything’s missing, but I’ve been using this for quite some time now day-to-day and haven’t seen any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide a way to control argv[0] of the spawned process
2 participants