Repository navigation
Conversation
|
Review requested:
|
|
Thanks for working on this! The commit and lint checks are currently failing. Have you also verified that this builds successfully locally? Please follow the guide below: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66569 +/- ##
=======================================
Coverage 90.47% 90.48%
=======================================
Files 791 791
Lines 277088 277088
Branches 53286 53276 -10
=======================================
+ Hits 250703 250715 +12
+ Misses 16805 16771 -34
- Partials 9580 9602 +22
🚀 New features to boost your workflow:
|
Hello Yuya. This PR is part of a number of PRs to be opened for the z/OS port; in our environment, which includes all the port, node builds successfully. |
| sa.sa_sigaction = handler; | ||
| sa.sa_flags = reset_handler ? SA_RESETHAND : 0; | ||
| #ifdef __MVS__ | ||
| sa.sa_flags |= SA_ONSTACK | SA_SIGINFO; |
There was a problem hiding this comment.
A lot of these changes could use comments that explain why specifically z/OS needs these and other OSes don't – e.g. SA_ONSTACK and SA_SIGINFO aren't z/OS-specific per se, so it's not obvious why the conditional is here (I might guess because of SIGABRT being listed below as a handled signal – but let's not have this be a silent assumption?)
There was a problem hiding this comment.
Please see https://www.ibm.com/docs/en/zos/3.1.0?topic=functions-sigaction-examine-change-signal-action.
For SA_SIGINFO, sa_sigaction is specified for the sigaction() call here. For SA_ONSTACK, it's to use the alternate signal stack created initially in zosStart(), to not interfere with the z/OS Language Environment runtime environment.
Would you like such comments added in the code, or in the commit's message?
There was a problem hiding this comment.
I've added a comment for this case inline.
There was a problem hiding this comment.
Anything else for this PR in particular that requires explanation? Do you prefer comments from the PR's description to be added around the affected code?
There was a problem hiding this comment.
Yes, more code comments around the #ifdef guards is preferable.
|
The QUIC build failure has been fixed in #66603. Rebasing onto the latest main should resolve it. |
- Add new src/node_zos.h and src/node_zos.cc, used by src/node.cc. - Add new src/zos_setlibpath.cc and link its .o directly into node so the __setlibpath object's constructor finds libnode.so and add its path to LIBPATH, so it can be loaded. - Pass '-Wl,-bedit=no' when linking libnode.so to reduce its size. - Use z/OS specific signal handling logic, as signals on z/OS must be handled in a dedicated thread. - Force V8 flag --nohard_abort due to absence of XPLINK headers in JS generated code. - Include display of zoslib build version. Signed-off-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Signed-off-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
Signed-off-by: Gaby Baghdadi <baghdadi@ca.ibm.com>
| // Copyright Joyent, Inc. and other Node contributors. | ||
| // | ||
| // Permission is hereby granted, free of charge, to any person obtaining a | ||
| // copy of this software and associated documentation files (the | ||
| // "Software"), to deal in the Software without restriction, including | ||
| // without limitation the rights to use, copy, modify, merge, publish, | ||
| // distribute, sublicense, and/or sell copies of the Software, and to permit | ||
| // persons to whom the Software is furnished to do so, subject to the | ||
| // following conditions: | ||
| // | ||
| // The above copyright notice and this permission notice shall be included | ||
| // in all copies or substantial portions of the Software. | ||
| // | ||
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
| // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
| // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
| // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
| // USE OR OTHER DEALINGS IN THE SOFTWARE. |
There was a problem hiding this comment.
Do not include the copyright header in new files.
| // (C) Copyright IBM Corp. 2024. All Rights Reserved. | ||
| // US Government Users Restricted Rights - Use, duplication | ||
| // or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. | ||
| /////////////////////////////////////////////////////////////////////////////// |
There was a problem hiding this comment.
If this is pulling from a different project, the license file script needs to be updated to account for it. What is the license of that other work? We cannot bundle this file without a clear indication of a compatible OSS license. Minus such a license, there is no indication that you have the rights to contribute this code to the project. It appears you are from IBM but that alone is not sufficient here.
jasnell
left a comment
There was a problem hiding this comment.
The license of the zos_setlibpath.cc file needs to be clarified before this can be merged.
Updates here apply to z/OS only.