Skip to content

bpo-41675: Modernize siginterrupt calls#22028

Merged
pablogsal merged 2 commits into
python:masterfrom
pablogsal:41675
Sep 2, 2020
Merged

bpo-41675: Modernize siginterrupt calls#22028
pablogsal merged 2 commits into
python:masterfrom
pablogsal:41675

Conversation

@pablogsal

@pablogsal pablogsal commented Aug 31, 2020

Copy link
Copy Markdown
Member

Comment thread Modules/signalmodule.c Outdated
else {
act.sa_flags |= SA_RESTART;
}
if (sigaction(signalnum, &act, NULL)<0) {

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.

nitpick:

Suggested change
if (sigaction(signalnum, &act, NULL)<0) {
if (sigaction(signalnum, &act, NULL) < 0) {

and also below: if (siginterrupt(signalnum, flag) < 0) {.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,3 @@
The implementation of :func:`signal.siginterrupt` now uses
:c:func:`sigaction` instead of the deprecated :c:func:`siginterrupt`. Patch

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.

You may mention that it's only used when sigaction() is available.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@pablogsal pablogsal requested a review from vstinner September 2, 2020 10:55

@vstinner vstinner left a comment

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.

@pablogsal pablogsal merged commit f9c5e3f into python:master Sep 2, 2020
@pablogsal pablogsal deleted the 41675 branch May 19, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet