Skip to content

Conversation

@pxinwr
Copy link
Contributor

@pxinwr pxinwr commented Nov 19, 2020

  1. There are some discussion about "sig_atomic_t fd;" in PR 12670. POSIX spec doesn't define its type. In practice, most implementation defines it as int. Go to Atomic-Types So far it works fine on known OSes. However, on VxWorks, sig_atomic_t is defined as 'unsigned char'. Assigning it to -1 will have problem. So we define wakeup.fd as int specially for VxWorks.
  2. VxWorks has no getitimer() and setitimer() C api available. So skipping the test on VxWorks.

https://bugs.python.org/issue31904

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to not add a new blurb category just for VxWorks. Would you mind to reuse the Library category?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fine. Fixed accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to not copy/paste the code, restrict the difference to the loop. Something like:

Suggested change
for chunk_size in (2 ** 16, 2 ** 8, 1):
if sys.platform == "vxworks":
CHUNK_SIZES = (1,)
else:
CHUNK_SIZES = (2 ** 16, 2 ** 8, 1)
for chunk_size in CHUNK_SIZES:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better solution. Changed.

@vstinner
Copy link
Member

Merged, thanks. The updated PR is simpler.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@pxinwr pxinwr deleted the fix-issue-31904-signal branch May 7, 2021 07:42
@kuhlenough kuhlenough mannequin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants