Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Simon Riggs" <simon(at)2ndQuadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Date: 2011-02-17 17:07:09
Message-ID: 4D5D015D020000250003ABA5@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> In at least some of these cases, I think ignoring the write()
> result is intentional, because there's really nothing useful we
> can do about it if it fails (oh, you wish we'd log a failure to
> write to the log?).

I know that in Java you can get a positive number less than the full
size as an indication that part of the block was written, and you
must loop to write until you get all of it written (or get an error
return). At this page, it appears that the same is true of the
write function in C:

http://www.gnu.org/s/libc/manual/html_node/I_002fO-Primitives.html

Quoting from that page:

| The return value is the number of bytes actually written. This may
| be size, but can always be smaller. Your program should always
| call write in a loop, iterating until all the data is written.

Isn't that the write function we're calling? If so, are you
maintaining that the gnu.org documentation of this function is
wrong?

-Kevin

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-02-17 17:19:48 Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Previous Message Kevin Grittner 2011-02-17 16:38:49 Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-02-17 17:07:17 Re: Debian readline/libedit breakage
Previous Message Bruce Momjian 2011-02-17 16:58:44 Re: Debian readline/libedit breakage