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

Fix spaces on long process names for MacOS #1035

Merged
merged 2 commits into from Apr 1, 2021

Conversation

jblesener
Copy link
Contributor

Fixes #1034.

@jblesener
Copy link
Contributor Author

Checking in on this PR, please let me know if I need to make any modifications.

process/process_darwin.go Outdated Show resolved Hide resolved
@shirou
Copy link
Owner

shirou commented Mar 21, 2021

Thank you for your great PR. I add a comment but others are good!

I can confirm it works on Mac BigSur. And from man ps on Mac BigSur,

     -c      Change the ``command'' column output to just contain the executable name, rather than the full command line.

So it is good way to add this arg to get only command name.

(by the way, ps on Mac comes from BSD ps, so I think this patch is very useful for other bsd families)

Signed-off-by: John Blesener <jblesener@reactivelabs.com>
@jblesener
Copy link
Contributor Author

Hmm, I don't have any BSD instances to test against. Let me see if I can spin up a VM or two in order to port these changes over in a separate PR.

@shirou shirou merged commit 79048cc into shirou:master Apr 1, 2021
@shirou
Copy link
Owner

shirou commented Apr 1, 2021

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

Processes with spaces in the name on MacOS get truncated
2 participants