Not sure if this is a good idea. What if fd 0 was closed and then assigned to a TCP socket?