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

Changing process.title does nothing #14255

Open
brownjoel opened this issue Sep 30, 2024 · 1 comment
Open

Changing process.title does nothing #14255

brownjoel opened this issue Sep 30, 2024 · 1 comment
Labels
bug Something isn't working good first issue Something that would be good for new contributors node:process

Comments

@brownjoel
Copy link

What version of Bun is running?

1.1.29+6d43b3662

What platform is your computer?

Darwin 23.5.0 x86_64 i386 and Linux 6.8.0-40-generic x86_64 x86_64

What steps can reproduce the bug?

Run

bun -e "process.title='foo'; console.log(process.title)"

What is the expected behavior?

foo to be printed to the console.

What do you see instead?

bun is printed to the console.

Additional information

If run with node 20, this works as expected:

% node -e "process.title='foo'; console.log(process.title)"
% foo
Welcome to Node.js v20.11.0.
Type ".help" for more information.
> process.title='foo'
'foo'
> console.log(process.title)
foo

In bun:

Welcome to Bun v1.1.29
Type ".help" for more information.
[!] Please note that the REPL implementation is still experimental!
    Don't consider it to be representative of the stability or behavior of Bun overall.
> process.title='foo'
'foo'
> console.log(process.title)
bun

Tested on a variety of machines, including macOS and Ubuntu.

@brownjoel brownjoel added bug Something isn't working needs triage labels Sep 30, 2024
@dylan-conway dylan-conway added node:process good first issue Something that would be good for new contributors and removed needs triage labels Oct 1, 2024
@dylan-conway
Copy link
Collaborator

This is a bug in src/bun.js/bindings/exports.zig. Process.setTitle/getTitle should be saving input titles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Something that would be good for new contributors node:process
Projects
None yet
Development

No branches or pull requests

2 participants