GithubHelp home page GithubHelp logo

process.title about nodebook HOT 6 CLOSED

thom4parisot avatar thom4parisot commented on May 20, 2024
process.title

from nodebook.

Comments (6)

misterdjules avatar misterdjules commented on May 20, 2024 1

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.

from nodebook.

misterdjules avatar misterdjules commented on May 20, 2024

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.

from nodebook.

thom4parisot avatar thom4parisot commented on May 20, 2024

@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)

from nodebook.

thom4parisot avatar thom4parisot commented on May 20, 2024

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.

from nodebook.

misterdjules avatar misterdjules commented on May 20, 2024

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.

from nodebook.

thom4parisot avatar thom4parisot commented on May 20, 2024

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

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

from nodebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.