-
Notifications
You must be signed in to change notification settings - Fork 105
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
Panic when reading process comm values with invalid UTF-8 characters #39
Comments
Thanks for the report. What would you recommend here? I suppose these fields could be converted from |
That'd work for me. At least it won't panic, which is kinda surprising when using a library, but I guess this way more bugs can be unveiled because people will actually report their |
You're right that a library that panics is a little unusual. It was a deliberate choice on my part as a way to encourage bug reports. I don't know if it was the right choice, though. It has proven useful, at the expense of annoying users. Now that I think about it some more, maybe I could introduce a feature that would suppress panics (and turn them into |
@eminence I use your library in a project, and I'm also concerned about it panicking in production (not so much annoy but a production deal-breaker). Maybe having an error type for unexpected data/format (with backtrace) - which your users can report - will be a good middle ground? I will gladly help turn the package panic free if you decide to go for it. |
Thanks for the feedback. I've opened a new issue to discuss the general topic of removing as many panics as possible. I also realized that I've failed to address the original issue brought up by @edigaryev -- I'll plan on doing that work this week. |
comm
values can contain pretty much any characters, which breaks/proc/[pid]/stat
parsing:The text was updated successfully, but these errors were encountered: