in reply to What habits do you have to avoid introducing bugs?

Reading the documentation. That would have make you realize that fork returns undef on error.