Author Birne94
Recipients Birne94
Date 2017-03-20.12:08:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za>
In-reply-to
Content
Python/thread_pthread.h:145 defines the CHECK_STATUS macro used for printing error messages in case any of the calls fail.

CHECK_STATUS uses perror for formatting an error message, which relies on the global erno being set (see man perror). Since the pthread functions return their status code instead of setting erno (which might not even work in threaded environments), no additional information is displayed. See for example produced by PyThread_release_lock:

pthread_mutex_lock[3]: Undefined error: 0
pthread_cond_signal: Undefined error: 0
pthread_mutex_unlock[3]: Undefined error: 0

The correct solution would be to use strerror(status) in order to show the proper message.
History
Date User Action Args
2017-03-20 12:08:19Birne94setrecipients: + Birne94
2017-03-20 12:08:19Birne94setmessageid: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za>
2017-03-20 12:08:19Birne94linkissue29859 messages
2017-03-20 12:08:19Birne94create