Opened 8 years ago

Closed 8 years ago

#10529 closed Bugs (fixed)

The pthread/condition_variable_any constructor reports incorrect error code for pthread_cond_init

Reported by: Boguslaw Sluka <zen77@…> Owned by: viboes
Milestone: Boost 1.57.0 Component: thread
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

Constructor of condition_variable_any in pthread implementation reports error in the following way:

 int const res2=pthread_cond_init(&cond,NULL);
            if(res2)
            {
                BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
                boost::throw_exception(thread_resource_error(res, "boost::condition_variable_any::condition_variable_any() failed in pthread_cond_init"));
            }

The thread_resource_error shall use res2 instead of res.

Attachments (1)

patch.txt (329 bytes ) - added by Boguslaw Sluka <zen77@…> 8 years ago.

Download all attachments as: .zip

Change History (5)

by Boguslaw Sluka <zen77@…>, 8 years ago

Attachment: patch.txt added

comment:1 by Boguslaw Sluka <zen77@…>, 8 years ago

boost\thread\pthread\condition_variable.hpp

comment:2 by Boguslaw Sluka <zen77@…>, 8 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:3 by viboes, 8 years ago

Milestone: To Be DeterminedBoost 1.57.0
Owner: changed from Anthony Williams to viboes
Status: newassigned

Thanks for catching this.

comment:4 by viboes, 8 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.