List:Internals« Previous MessageNext Message »
From:Vasil Dimov Date:April 19 2007 5:34pm
Subject:fix error handling: pthread_key_create() does not set errno
View as plain text  
Hi,

mysys/my_thr_init.c (in 5.1 and 5.0) reads:

84   if (pthread_key_create(&THR_KEY_mysys,0))
85   {
86     fprintf(stderr,"Can't initialize threads: error %d\n",errno);
87     return 1;
88   }

But pthread_key_create() does not set errno in case of an error but
rather emits the error code as a return value.

-- 
Vasil Dimov
moc.elcaro@stripped        Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv                Committer @ FreeBSD.org
gro.d5v@dv                    Home @ Sofia, Bulgaria

Attachment: [application/pgp-signature]
Thread
fix error handling: pthread_key_create() does not set errnoVasil Dimov19 Apr
  • Re: fix error handling: pthread_key_create() does not set errnoChad MILLER19 Apr