version 1.45, 2019/12/02 22:17:32 |
version 1.46, 2021/10/24 21:24:17 |
|
|
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666); |
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666); |
if (tofd == -1) |
if (tofd == -1) |
return -1; |
return -1; |
fromfd = open(from, O_RDONLY, 0); |
fromfd = open(from, O_RDONLY); |
if (fromfd == -1) |
if (fromfd == -1) |
pfatal("internal error, can't reopen %s", from); |
pfatal("internal error, can't reopen %s", from); |
while ((i = read(fromfd, buf, bufsz)) > 0) |
while ((i = read(fromfd, buf, bufsz)) > 0) |