Skip to content
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

Two issues with error message when using a bad PID string #22

Open
rwatson opened this issue Nov 7, 2023 · 2 comments
Open

Two issues with error message when using a bad PID string #22

rwatson opened this issue Nov 7, 2023 · 2 comments
Assignees

Comments

@rwatson
Copy link
Member

rwatson commented Nov 7, 2023

While mistyping a chericat command:

chericat -f tmp.db -p ./check.c18n

I ran into the following message:

chericat: Unable to obtain the vm map information from process 0, does cherciat have the right privilege?

There are two issues here: (1) Probably we should be using strtol() (or similar) rather than atoi() so that better error messages can reported -- it’s not 0, it’s a bad integer conversion and we shouldn’t have gotten this far; and (2) chericat is misspelled in the warning message.

@rwatson
Copy link
Member Author

rwatson commented Nov 10, 2023

FYI, I noticed when reading the code that atoi() is used a fair amount in nearby code. On the whole, switching to using strtol() (or similar) to enable better error checking on values would likely be a good thing to do.

@psjm3
Copy link
Contributor

psjm3 commented Nov 21, 2023

Fixed in #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants