version 1.13, 2005/07/07 14:27:57 |
version 1.14, 2005/07/20 16:14:55 |
|
|
|
|
fd = mkstemp(template); |
fd = mkstemp(template); |
if (fd == -1) { |
if (fd == -1) { |
cvs_log(LP_ERRNO, "failed to mkstemp file `%s': %s", |
cvs_log(LP_ERRNO, "failed to mkstemp file `%s'", template); |
template, strerror(errno)); |
|
return (-1); |
return (-1); |
} |
} |
|
|
ret = cvs_buf_write_fd(b, fd); |
ret = cvs_buf_write_fd(b, fd); |
if (ret == -1) { |
if (ret == -1) { |
cvs_log(LP_ERRNO, "failed to write to temp file `%s': %s", |
cvs_log(LP_ERRNO, "failed to write to temp file `%s'", |
template, strerror(errno)); |
template); |
(void)unlink(template); |
(void)unlink(template); |
} |
} |
(void)close(fd); |
(void)close(fd); |