test: shared lib build doesn't handle SIGPIPE · nodejs/node@eaf474c · GitHub
Skip to content

Commit eaf474c

Browse files
yhwangBethGriggs
authored andcommitted
test: shared lib build doesn't handle SIGPIPE
For shared lib build, we leave the signal handling for embedding users. In these two test cases: - `parallel/test-process-external-stdio-close-spawn` - `parallel/test-process-external-stdio-close` The pipe is used for stdout and is destroied before child process uses it for logging. So the node executble that uses shared lib build receives SIGPIPE and the child process ends. This change ignores the SIGPIPE in node_main.cc for shared lib case. Refs: #18535 Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: #19211 Refs: #18535 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent 3128cb7 commit eaf474c

3 files changed

Lines changed: 39 additions & 17 deletions

File tree

node.gyp

Lines changed: 3 additions & 17 deletions

node.gypi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@
3737
'NODE_SHARED_MODE',
3838
],
3939
}],
40+
[ 'OS=="win"', {
41+
'defines!': [
42+
'NODE_PLATFORM="win"',
43+
],
44+
'defines': [
45+
'FD_SETSIZE=1024',
46+
# we need to use node's preferred "win32" rather than gyp's preferred "win"
47+
'NODE_PLATFORM="win32"',
48+
# Stop <windows.h> from defining macros that conflict with
49+
# std::min() and std::max(). We don't use <windows.h> (much)
50+
# but we still inherit it from uv.h.
51+
'NOMINMAX',
52+
'_UNICODE=1',
53+
],
54+
}, { # POSIX
55+
'defines': [ '__POSIX__' ],
56+
}],
57+
4058
[ 'node_enable_d8=="true"', {
4159
'dependencies': [ 'deps/v8/src/d8.gyp:d8' ],
4260
}],

src/node_main.cc

Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)