-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Completion of error handling #33
Comments
I my opinion, check Malloc here is no necessary, because if the system was out of memory, it can't run . |
I would appreciate if return values will also be checked from Pthread functions. |
The program will be ok even pthread_cond_signal failed . I can do nothing when it failed, and program never abort when it failed. |
Do you care if the requested threads and mutexes were ever be correctly created? |
I add some check for pthread api just now, thanks. |
Thanks for this small improvement. I find such a source code adjustment still incomplete. I do not know why you seem to prefer so far to ignore return values from relevant function calls. |
If it fails, only I can do is exit . and any reason of exit (even segment I know how my system works and ignore the error call I don't care. 2013/9/1 Markus Elfring notifications@github.com
|
Return value ignorance can result in software which contains a couple of open issues. I guess that other users might also be more interested in detailed failure reasons for your program. |
The return values I ignore never break the program. sometimes we don't care about success or failed because they do it continuous, just like keep alive each other. If we find something wrong from other way, only thing we can do is kill the process and reboot the whole system. |
Wrong. - Why do you perform a computation if you are not interested in the corresponding return value at all? How long will your program run until the violation of an invariant will be detected? |
You haven't read my code and understand how and why I ignore these . Some times I don't care the result, I do the same things over and over, The next step is not depend on the last step, so just do it. If some thing wrong with the system, just kill the whole process and reboot it. The os protects it can't do bad things, it's enough. |
Why do you perform a computation if you are not interested in the corresponding return value at all? |
Does return value ignorance affect software correctness? Do other software developers and testers care more for risks from unused return values? |
I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.
Would you like to add more error handling for return values from functions like the following?
The text was updated successfully, but these errors were encountered: