Skip to content

bpo-29859: Fix error messages from return codes for pthread_* calls#741

Merged
methane merged 3 commits into
python:masterfrom
Birne94:bpo-29859
Mar 21, 2017
Merged

bpo-29859: Fix error messages from return codes for pthread_* calls#741
methane merged 3 commits into
python:masterfrom
Birne94:bpo-29859

Conversation

@Birne94

@Birne94 Birne94 commented Mar 20, 2017

Copy link
Copy Markdown
Contributor

Fix error messages from return codes for pthread_* calls

Before (example call to PyThread_release_lock):

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

After (example call to PyThread_release_lock):

pthread_mutex_lock[3]: Invalid argument
pthread_cond_signal: Invalid argument
pthread_mutex_unlock[3]: Invalid argument

Comment thread Python/thread_pthread.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temporary variable seems redundant.
fprintf(stderr, "%s: %s\n", name, strerror(status)) is enough, maybe.

You removed error = 1;. Is it intended change?

Please wrap line within 79 columns.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, I have updated the PR. Should I squash both commits?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use "Squash and merge" button always.
So there is no need to create "crean commit log" in pull request branch.

Would you add an entry to Misc/NEWS too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@methane methane added needs backport to 3.6 type-bug An unexpected behavior, bug, or error labels Mar 21, 2017
@methane

methane commented Mar 21, 2017

Copy link
Copy Markdown
Member

Uh, NEWS cause conflict. Could you merge origin/master?

@Birne94

Birne94 commented Mar 21, 2017

Copy link
Copy Markdown
Contributor Author

I rebased my branch against upstream/master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants