Fix bad fork() return value handling