Ferror bug on a Sun client?
Robert S. Maier
rsm at ut-ngp.UUCP
Fri Jul 4 12:59:02 AEST 1986
We have had considerable trouble with /usr/ucb/mail (also known as
Mail) on a diskless Sun 2/50 which is a client of a diskful server.
Messages typed in are not sent, although the headers are. Moreover,
after one types ^D (i.e., EOF) to end the message the system responds
with "read: I/O error". This happens only on the client; never on the
server.
I think I have traced this to the following piece of code in Mail's
send.c:
/*
* Prepend a header in front of the collected stuff
* and return the new file.
*/
FILE *
infix(hp, fi)
struct header *hp;
FILE *fi;
{
...<lines omitted>...
c = getc(fi);
while (c != EOF) {
putc(c, nfo);
c = getc(fi);
}
if (ferror(fi)) {
perror("read");
return(fi);
}
Can anyone suggest why 'ferror' should return an error condition on
the keyboard input stream if the program is run on the client, but
never on the server? Has anyone ever encountered a similar problem?
Robert Maier ARPA: rsm at carl.ma.utexas.edu / rsm at ngp.utexas.edu
Dept. of Math. UUCP: ..{ihnp4, allegra, seismo!ut-sally}!ut-ngp!rsm
Univ. of Texas AT&T: (512)471-7711
More information about the Comp.unix.wizards
mailing list