Re: APC/socket fix (final?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: APC/socket fix (final?)
Date: 2004-03-25 17:46:25
Message-ID: 12873.1080236785@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> + #ifdef WIN32
> + /* Interrupted by socket/APC interaction? */
> + if (n < 0 && GetLastError() == ERROR_IO_PENDING)
> + errno = EINTR;
> + #endif

This seems a bit schizophrenic; if you can assign to errno, why can't you
read from it? Would look more consistent if the code looked like

if (n < 0 && errno == ERROR_IO_PENDING)
errno = EINTR;

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-03-25 18:57:25 Re: installdir patch for win32
Previous Message Tom Lane 2004-03-25 17:34:39 Re: installdir patch for win32