question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add new properties for the path and arguments separately

See original GitHub issue

Issuehunt badges

Currently there’s process.cmd, but it includes both the path and arguments. Would be useful for https://github.com/sindresorhus/fkill-cli/issues/16 to have separate process.path and process.args properties.

Context:

I looked into this more, and I might have a solution to get the arguments without the full path. It seems ps -o pid -o comm returns the full path without arguments and ps -o pid -o command returns with arguments. So we could get both columns and just diff them to get the arguments. I think this should be added as a new property in ps-list. So we could add an args property with just the arguments and a path property with the full path to the binary without arguments, just for completeness.

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sindresorhuscommented, Oct 11, 2020

Ideally, someone would write a cross-platform binary for this in Rust and we could just bundle some binaries for each platform, and fall back to ps if those fail or something.

0reactions
sindresorhuscommented, Oct 11, 2020

Can be done with different API, but that would require using more than just ps and would require writing a whole article on what is what for linux(/similar) process.

What other API? And why would it require writing a whole article?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to transform property into multiple arguments to <exec ...
I have a property that contains multiple values, and I want to execute a command with a separate "-j" argument for each value...
Read more >
Chapter 7. Object arguments: functions working with objects
This chapter covers. Using objects as arguments; Accessing object properties from within a function; Adding new object properties from within a function ...
Read more >
PATH and CLASSPATH (The Java™ Tutorials > Essential ...
Select Start, select Control Panel. double click System, and select the Advanced tab. · Click Environment Variables. · In the Edit System Variable...
Read more >
21. Externalized Configuration - Spring
You can use properties files, YAML files, environment variables and command-line arguments to externalize configuration. Property values can be injected ...
Read more >
Using CSS custom properties (variables) - MDN Web Docs
Custom properties (sometimes referred to as CSS variables or cascading ... will be treated as a separate custom property to --My-color .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found