fdopen in binary