Re:fork() can fail
by jwr on Thursday August 21, 2014 @05:00PM
(#8209572)
It does, because somebody might have done something to the filesystem between your test and the rest of your code.
This is why I found your "Defensive Programming 101 really" comment slightly arrogant (perhaps I misunderstood the intention). Writing correct programs is not easy and one should not mock others, because there is always something new to learn.
This is why I found your "Defensive Programming 101 really" comment slightly arrogant (perhaps I misunderstood the intention). Writing correct programs is not easy and one should not mock others, because there is always something new to learn.