-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add a fallback for ps in remoteProcessPickerScript #5207
Add a fallback for ps in remoteProcessPickerScript #5207
Conversation
scripts/remoteProcessPickerScript
Outdated
command=`awk '{print $2}' /proc/$pid/stat | tr -d '()'` | ||
args=`xargs -0 < /proc/$pid/cmdline | awk '{print $2}'`; | ||
printf "%5s %.1s %-49s %-27s \n\r" $pid $flags $command $args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add comments for what each of these lines is accomplishing. I am not an expert with linux utils and it would be helpful when referencing it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for feedback, I have updated it with explanation of each line
This seems similar to a script that VS Code ships with - https://github.com/microsoft/vscode/blob/main/src/vs/base/node/ps.sh |
981023f
to
c40f0bc
Compare
Yes very similar from the looks of it, only difference being the columns its outputting really, I am not familiar with vs code extension development, would it be possible to use their script instead of maintaining this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It doesn't appear that they expose this as an API and I don't think we would have access to it. |
Addresses #4096 by providing a fallback to ps when ps is not available or when ps doesn't support all options.
This solves connecting to Alpine hosts that don't support the flags output option and Ubuntu docker images that don't have ps installed by default.