netnews under Eunice - bug fix
libes at nbs-amrf.UUCP
libes at nbs-amrf.UUCP
Tue May 22 05:10:54 AEST 1984
This is in response to t4test!chip's complaint about multiple postings not
working under Eunice due to link(). This was exactly the behavior on our
system (running B 2.10 Beta 3/9/83). I'm not that concerned about disk
space so I changed the link to a cp. Works fine.
Forgive me for posting this to multiple newsgroups (one at a time!).
Obviously the people who have this bug will miss it if I didn't do this.
Here is the change to inews.c:
522a523,524
> struct stat dummy;
>
524,529c526,540
< if (link(ARTICLE, bfr) == 0) break;
< e = errno; /* keep log from clobbering it */
< fprintf(stderr, "Cannot install article as %s\n", bfr);
< log("Cannot install article as %s", bfr);
< if (e != EEXIST) {
< log("Link into %s failed, errno %d, check dir permissions.", bfr, e);
---
> if (stat(bfr,&dummy) == -1) {
> #ifdef VMS
> char system_arg[BUFSIZ];
>
> /* copy since VMS doesn't do links - DEL */
> sprintf(system_arg,"/bin/cp %s %s",ARTICLE,bfr);
> if (0 == (e = system(system_arg))) break;
> #else
> if (link(ARTICLE, bfr) == 0) break;
> e = errno; /* keep log from clobbering it */
> #endif VMS
> fprintf(stderr, "Cannot install article as %s\n", bfr);
> log("Cannot install article as %s", bfr);
> log("Link into %s failed, err=%d, check dir perm",
> bfr, e);
Don Libes {seismo,allegra}!umcp-cs!nbs-amrf!libes
More information about the Net.bugs
mailing list