3 ms·
True, I guess just this example didn't jive with me. I'd never dream of ignoring the return code of fork(). Some other call I don't respect enough would probab
by jacobush 7y ago
True, I guess just this example didn't jive with me. I'd never dream of ignoring the return code of fork().
Some other call I don't respect enough would probably bite my ass, though.
- oconnor663 7y agoIt's not just a question of whether you did the right thing when you wrote the code. Code gets refactored and moved around, maybe by people less experienced than the original author, or maybe just by the original author when they're tired or after they've forgotten the context. Wrapper functions get defined, libraries get updated, and support gets added for new platforms. Each of those changes is an opportunity to accidentally stop checking the return code.