bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS update [cvs1-11-x-branch]: /ccvs/src/


From: Larry Jones
Subject: Re: CVS update [cvs1-11-x-branch]: /ccvs/src/
Date: Wed, 25 Aug 2004 16:45:00 -0400 (EDT)

Mark D. Baushke writes:
> 
> I was under the impression that fwrite() returned the number of objects
> written that were of size bytes... We are only asking to write one
> object in our calls to fwrite.

Only the two defective ones in client.c:

        fwrite (args, len, sizeof (*args), stdout);

should be:

        fwrite (args, 1, len, stdout);

(note that "sizeof (*args)" is 1 by definition.)  All the other calls to
fwrite are written correctly.

> In an ideal world, we would probably move away from using the stdio
> library entirely and use raw file operations such as the write() and
> select() and pay close attention to the return values.

Heavens, no!  Why should we write system-specific code to deal with
non-blocking FDs when we don't need or want non-blocking behavior?  The
right thing to do, as I said before, is to turn off non-blocking mode
and continue to use stdio.

-Larry Jones

I think grown-ups just ACT like they know what they're doing. -- Calvin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]