Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
bpo-31904: fix signalmodule issue in VxWorks#12670
bpo-31904: fix signalmodule issue in VxWorks#12670yuesun1 wants to merge 4 commits intopython:masterfrom
Conversation
The type of sig_atomic_t is 'unsigned char' in VxWorks, so it can't be assigned to -1,so I set the type of fd in struct 'wakeup' to 'int' for VxWorks.
jdemeyer left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thefd member is clearly meant to be a file descriptor, which is of typeint (as specified by POSIX). So the old code is unconditionally wrong: you should useint on all systems, not just VxWorks. This happened to work becausesig_atomic_t isint on almost all systems.
| @@ -0,0 +1 @@ | |||
| fix VxWorks signalmodule issue | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'd rather frame this as a general bug-fix and not a VxWorks-specific issue.
jdemeyer commentedApr 10, 2019
Now that you're correctly using |
yuesun1 commentedApr 10, 2019
Thanks for your comment, now the fd is not atomic, do you mean I also still use _Py_atomic_load() or _Py_atomic_store() to read/write it ? Thanks very much |
vstinner commentedApr 17, 2019
Please open a separated issue for this change. |
jdemeyer commentedApr 17, 2019
Yes, I think so. You'll find many uses of these functions in |
vstinner commentedMay 21, 2019
The easiest way to fix VxWorks but not impact other operating systems if to modify your PR as, pseudo-code: |
jdemeyer commentedMay 21, 2019
The existing code is unconditionally wrong: it's a file descriptor, which is of type |
vstinner commentedMay 21, 2019
I already asked "Please open a separated issue for this change." but nobody did that. |
jdemeyer commentedMay 21, 2019
I know but that doesn't imply that the existing code is correct. It only means that nobody cares enough to open an issue. |
vstinner commentedMay 21, 2019
In case of doubt, I'm ok to leave the code unchanged: that's the safest option. That's the principle ofhttps://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence To remove the fence, someone must first investigate why it's there. This issue is about VxWorks. I disagre that adding VxWorks support would change the code on other platforms. |
vstinner commentedNov 30, 2020
Let's continue the work on PR#23391. |
Uh oh!
There was an error while loading.Please reload this page.
The type of sig_atomic_t is 'unsigned char' in VxWorks, so it can't be assigned to -1, so in the signalmodule.c. I set the data type of fd in struct 'wakeup' to 'int' for VxWorks.
More and full support on modules for VxWorks will continuously be added by the coming PRs.
VxWorks is a product developed and owned by Wind River. For VxWorks introduction or more details, go tohttps://www.windriver.com/products/vxworks/
Wind River will have a dedicated engineering team to contribute to the support as maintainers.
We already have a working buildbot worker internally, but has not bound to master. We will check the process for the buildbot, then add it.
https://bugs.python.org/issue31904