fd2 is valid if fd2 >= 0.  fixes #18.