dspinellis / dgsh

Shell supporting pipelines to and from multiple processes
http://www.spinellis.gr/sw/dgsh/
Other
323 stars 23 forks source link

Completion of error handling #38

Closed elfring closed 7 years ago

elfring commented 7 years ago

Would you like to add more error handling for return values from functions like the following?

dspinellis commented 7 years ago

Sure. If you check for fputs, errors you also need to check errors by printf, etc. Perhaps just check stdout for error before exiting?

elfring commented 7 years ago

I suggest to avoid ignorance of return values a bit more. How do you think about to improve static source code analysis also for your software?

dspinellis commented 7 years ago

Regarding the ignorance of return values, you have to balance the probability of errors against the affect on code readability. That's why I suggest a single check at the end of the program.

Regarding static code analysis, yes it should be a part.

elfring commented 7 years ago
dspinellis commented 7 years ago

Sorry, no.