salkind@cmcl2.UUCP (06/02/84)
The reason fflush doesn't necessarily cause output is because EUNICE also buffers its data internally. To get around this, type fflush(f); _$unopen(fileno(f)); when you really want the output to appear. You will also have to link with -noshare, I believe. Yuch. Lou
jss@sjuvax.UUCP (Jonathan Shapiro) (06/15/84)
[Aren't you hungry...] Sorry if my last posting went partial - I got interrupted by a talk daemon... In any case, I think that this has come up before, and I am hoping someone knows a fix. I am trying to get netnews up on our system, and having some trouble with the last phase of inews.c I have compiled with debug, and what I get runs (edited) as follows: History returns FALSE /* appropriate miscelaneous complaints about which article number due to not updating active on previous attempts... */ ACTIVE close status = -1 The last line is the problem. We are running EUNICE (4.1 emulation), And installing multiple DEBUG ifdefs revealed that what is happening is that the flush on the buffer is failing. The article has already been installed. (/usr/spool/news/test/#), but the active file does not get updated. If I update the active file by hand, readnews works exactly right... If anyone out there has a fix, would they please be so kind as to mail it to me? I already have in the file the 4.1 fix which closes and reopens the ACTIVE file... Thanks in advance... Jonathan Shapiro Haverford College Haverford, Pa. 19041
keith@seismo.UUCP (Keith Bostic) (06/21/84)
[Chomp, chomp, chomp...] One of the more interesting bugs in Eunice is that fflush(3S) has no effect whatsoever. The only effective solution that I know of is to explicitly close the file and reopen it should it be needed later. We aren't running Eunice at the moment so there's not much else I can tell you; try replacing all of the fflushes with appropriate code. Keith Bostic ARPA: keith@seismo UUCP: seismo!keith