Commit 30eb7db8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Pthread_create() acutally doesnt set errno as we expect.

Spotted by: Rasmus Villemoes
parent 49334d85
......@@ -528,7 +528,8 @@ pool_breed(struct pool *qp)
AZ(pthread_attr_getstacksize(&tp_attr, &pi->stacksize));
pi->qp = qp;
if (pthread_create(&tp, &tp_attr, pool_thread, pi)) {
errno = pthread_create(&tp, &tp_attr, pool_thread, pi);
if (errno) {
FREE_OBJ(pi);
VSL(SLT_Debug, 0, "Create worker thread failed %d %s",
errno, vstrerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment