close() std descriptors before dup()