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

process.title #9

Closed
thom4parisot opened this issue Sep 21, 2014 · 6 comments
Closed

process.title #9

thom4parisot opened this issue Sep 21, 2014 · 6 comments

Comments

@thom4parisot
Copy link
Owner

Spécifier un nom pour faciliter la lecture du processus dans ps et l'onglet du terminal.

cc @DavidBruant

@thom4parisot thom4parisot modified the milestone: v1 • Première édition Jan 26, 2017
@misterdjules
Copy link

FWIW, process.name does not exist, were you referring to process.title? If so:

  1. process.title does not allow to change any terminal's window's title. To do that, one needs to use terminal escaping sequences.

  2. Setting process.title is a confusing API to use. It does not behave the same on all platforms, and has some confusing limitations on all of them. I can expand on that if you'd like to get more details.

@thom4parisot
Copy link
Owner Author

@misterdjules correct, I was referring to process.title (bad memory).

Are there more limitations than the ones detailed on https://nodejs.org/api/process.html#process_process_title? More limitations than a size limit?

If you have time, I am curious to know more about it :-) (love reading insights from people working on the tools and languages themselves)

@thom4parisot thom4parisot changed the title process.name process.title Jan 26, 2017
@misterdjules
Copy link

Are there more limitations than the ones detailed on https://nodejs.org/api/process.html#process_process_title? More limitations than a size limit?

One additional limitation is that, currently, setting process.title is a no-op on some platforms like SmartOS and AIX, even though that is being fixed.

Another is that system tools on various platforms don't always read the arguments of a process from the memory area to which node writes when setting process.title. For instance, on SmartOS, running ps -p pid -o args= reads from /proc/pid/psinfo (which is not modified by setting process.title), but running ps auxww reads from the same memory area (although one must pass at least two ww on the command line).

In other words, the resulting behavior is not consistent across platforms and even across system tools on a given platform.

@thom4parisot
Copy link
Owner Author

Thanks @misterdjules :-) your insights on less mainstream OS is definitely eye opening!

I think it would be good to mention this API and to state these limitations, mostly to tell people to use it only if necessary, while being extra careful.

@misterdjules
Copy link

I think it would be good to mention this API and to state these limitations, mostly to tell people to use it only if necessary, while being extra careful.

Agreed.

@thom4parisot
Copy link
Owner Author

Thanks a lot @misterdjules for your very interesting knowledge :-)

Feel free to raise issues with unusual developer stuff or whatever you find interesting.

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

No branches or pull requests

2 participants