write_init
int write_init(int fd, FILE *f, const char *mode);
write_init(0, file, mode);
if (write_init(fd, NULL, mode) < 0) {