Hacker News new | ask | show | jobs
by jervisfm 4314 days ago
I was curious too about my own code, so I looked at the last publicly available C code I wrote with fork in it[1], and yep I checked for the error case too :)

I think this just came from being drilled in school on the importance of checking error return values. No matter how unlikely never assume that something can't happen. If it really can't you should at the very least assert on it.

[1] - https://github.com/jervisfm/W4118_HW1/blob/master/shell/shel...