Parallel restore checks wrong thread return value?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Parallel restore checks wrong thread return value?
Date: 2011-02-26 15:51:28
Message-ID: AANLkTikvVfT7L+NixYjQK3jeCz7wRstjX1uuwv28Ny_X@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

in spawn_restore:

child = (HANDLE) _beginthreadex(NULL, 0, (void *) parallel_restore,
args, 0, NULL);
if (child == 0)

But from my reading of the docs, _beginthreadex() returns -1 on error, not 0.

Bug, or am I reading it wrong?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-02-26 16:10:33 Re: wCTE: why not finish sub-updates at the end, not the beginning?
Previous Message Magnus Hagander 2011-02-26 15:28:43 Re: pg_basebackup and wal streaming