Comparing fd with zero for validity is a bad idea. We have been bitten with this already and I wanted to prevent it in the future.