Parallel restore checks wrong thread return value?
Parallel restore checks wrong thread return value?
От:
Magnus Hagander <magnus@hagander.net>
Дата:
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/
Re: Parallel restore checks wrong thread return value?
От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Sat, Feb 26, 2011 at 16:51, Magnus Hagander wrote: > 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? I was. _beginthread() returns -1 on error, and _beginthreadex() returns 0. That's just brilliant. Sorry about the noise. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/