Skip to content

process.title value is not respected on macOS (14.x.x+) #34280

Description

@coreybutler
  • Version: 14.0.0+
  • Platform: macOS
  • Subsystem: process

What steps will reproduce the bug?

process.title = "test"

How often does it reproduce? Is there a required condition?

This appears in all 14.x.x releases. It does not appear in 13.x.x (I tested with 13.5.0)

What is the expected behavior?

The process name should be test, which is typically reflected in the Activity Monitor on macOS.

What do you see instead?

The process name is always node

Additional information

This appears to be a regression of #28945.

Activity

  1. added
    macosIssues and PRs related to the macOS platform.
    on Jul 9, 2020
  2. devsnek commented on Jul 9, 2020

    @devsnek
    Member

    The name is changed (you can verify with ps, top, htop, etc) but activity monitor won't show the change. If you want activity monitor to reflect the change you have to use internal apple api hackery (or shell out to lsappinfo)

  3. coreybutler commented on Jul 9, 2020

    @coreybutler
    MemberAuthor

    @devsnek ah yes, I do see it with ps in 14.x.x.

    It seems to me that the most common process display tools (like Activity Monitor) should either be supported in Node, or the documentation should have a note to help folks understand why it doesn't display, especially since there are differences between Node releases.

    Just for reference, node-mac has pretty much "just worked" in Activity Monitor for several years using process.title=.... Only recently have I seen users submitting issues about not being able to find their process in tools like Activity Monitor. Point: something has obviously changed (again). That's fine as long as there is some reference to the change.

    I can close this issue and open a documentation issue instead, if documentation is a better direction.

  4. bnoordhuis commented on Jul 9, 2020

    @bnoordhuis
    Member

    Platform: macOS

    Can you post the output of uname -a? It might be relevant.

    FWIW, I'm fairly sure certain changes in libuv are responsible, probably libuv/libuv@6e3e422c. If that's the case it's trading a minor regression for a big one and this is the new status quo unless someone figures out a workaround.

  5. coreybutler commented on Jul 9, 2020

    @coreybutler
    MemberAuthor

    uname -a output:

    Darwin iMac.local 19.5.0 Darwin Kernel Version 19.5.0: Thu Apr 30 18:25:59 PDT 2020; root:xnu-6153.121.1~7/RELEASE_X86_64 x86_64
  6. devsnek commented on Jul 9, 2020

    @devsnek
    Member

    fwiw i don't observe any version of node (10 through 14) changing the title in activity monitor.

  7. bnoordhuis commented on Jul 10, 2020

    @bnoordhuis
    Member

    Libuv's Activity Monitor integration was last tested on macos 10.14. Apple has a habit of breaking the interface with every new release so it's quite possible that it no longer works.

    I'm not planning to investigate and I'm reluctant to take patches because every change to that subsystem seems to cause regressions, just check out git log src/unix/darwin-proctitle.c.

  8. coreybutler commented on Jul 10, 2020

    @coreybutler
    MemberAuthor

    Given the history and the unstable nature of Apple's releases, perhaps it's better to just document/cite this as a known behavior and move on. Thoughts?

  9. bnoordhuis commented on Jul 11, 2020

    @bnoordhuis
    Member

    @coreybutler Sounds reasonable. Want to open a PR?

  10. coreybutler commented on Jul 15, 2020

    @coreybutler
    MemberAuthor

    Yeah, I can do that.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosIssues and PRs related to the macOS platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions