amscanne / huptime

Utility for zero downtime restarts of unmodified programs.
GNU General Public License v3.0
1.85k stars 85 forks source link

Completion of error handling #4

Closed elfring closed 9 years ago

elfring commented 10 years ago

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?

amscanne commented 10 years ago

Would glady accept any improvements!

elfring commented 10 years ago

Are you interested to apply aspect-oriented software development? How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?

amscanne commented 10 years ago

I'd prefer to keep things simple.

I think most of the error cases are handled, so it's a matter of identifying those which are not and fixing them appropriately.

I'm rarely bothered to implement handling all malloc failures (but I'd gladly accept patches that fix this) simply because of the design of the Linux allocator. Given correct inputs, you'll find that malloc never fails -- just at some point the OOM killer will be invoked when you touch a newly "allocated" page.