-
Notifications
You must be signed in to change notification settings - Fork 20
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
pidof: Support '-t' flag #318
Conversation
Could you please add a test to make sure we don't regress? Thanks |
Added |
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.
Looks good.
I noticed a small difference to the original pidof
, though: it lists the IDs in a descending order whereas we use an ascending order:
$ pidof konsole -t
26231 26230 26229 26228 1365 1364 1363 1362 1361
$ cargo run -q pidof konsole -t
1361 1362 1363 1364 1365 26228 26229 26230 26231
Without the -t
flag, both use a descending order.
This flag makes pidof print thread ids of threads belonging to the matching processes.
Good catch, also found out that |
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.
Great work :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #318 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. |
This flag makes pidof print thread ids of threads belonging to the matching processes.