Improve error handling in print_files #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ptools
still contains some amount of hackathon-quality error handling. In particular,pfiles
can panic if a file descriptor in the target process is closed whilepfiles
is iterating over the entries in/proc/[pid]/fd/
. This modifiespfiles
to instead print a message to stderr and continue iterating over the file descriptors.I'll follow up with additional PRs to clean up more of the error handling, but this should prevent the issue where pfiles occasionally creates a coredump while a support bundle is being generated.
This also modifies
Cargo.toml
to ensure that full debug info is generated when we do a release build, since I notice that some debug info was missing while I was investigating this issue.Closes #9
cc @palashgandhi