version 1.1, 1996/02/03 12:11:55 |
version 1.2, 1996/06/26 03:42:13 |
|
|
if (nflag) |
if (nflag) |
printf("updating host %s\n", rhost); |
printf("updating host %s\n", rhost); |
else { |
else { |
|
int fd; |
|
|
if (setjmp(env)) |
if (setjmp(env)) |
goto done; |
goto done; |
signal(SIGPIPE, lostconn); |
signal(SIGPIPE, lostconn); |
if (!makeconn(rhost)) |
if (!makeconn(rhost)) |
return; |
return; |
if ((lfp = fopen(tempfile, "w")) == NULL) { |
if ((fd = open(tempfile, O_RDWR|O_EXCL|O_CREAT, 0666)) == -1 || |
|
(lfp = fdopen(fd, "w")) == NULL) { |
|
if (fd != -1) |
|
close(fd); |
fatal("cannot open %s\n", tempfile); |
fatal("cannot open %s\n", tempfile); |
exit(1); |
exit(1); |
} |
} |
|
|
if (nflag || (options & VERIFY)) |
if (nflag || (options & VERIFY)) |
tfp = NULL; |
tfp = NULL; |
else { |
else { |
if ((tfp = fopen(tempfile, "w")) == NULL) { |
int fd; |
|
|
|
if ((fd = open(tempfile, O_RDWR|O_EXCL|O_CREAT, 0666)) == -1 || |
|
(tfp = fdopen(fd, "w")) == NULL) { |
|
if (fd != -1) |
|
close(fd); |
error("%s: %s\n", stamp, strerror(errno)); |
error("%s: %s\n", stamp, strerror(errno)); |
return; |
return; |
} |
} |