diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2018-12-03 09:09:59 -0800 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2018-12-07 10:13:51 -0800 |
commit | c49d87e1131f31edb4ea9b9a1ab08eadae4dfc61 (patch) | |
tree | d387a0dc640592f8127dc25b6fe02facc4f2cde1 /src/inspector_agent.cc | |
parent | a9a595657651cd5c66a1d0ee8749ace8fb6b51c3 (diff) | |
download | node-new-c49d87e1131f31edb4ea9b9a1ab08eadae4dfc61.tar.gz |
src: do not alias new and old signal masks
In recent gcc, -Wrestrict warns when an argument passed to a
restrict-qualified parameter aliases with another argument.
PR-URL: https://github.com/nodejs/node/pull/24810
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/inspector_agent.cc')
-rw-r--r-- | src/inspector_agent.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 5e53201c42..21319abca7 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -110,7 +110,9 @@ static int StartDebugSignalHandler() { sigset_t sigmask; // Mask all signals. sigfillset(&sigmask); - CHECK_EQ(0, pthread_sigmask(SIG_SETMASK, &sigmask, &sigmask)); + sigset_t savemask; + CHECK_EQ(0, pthread_sigmask(SIG_SETMASK, &sigmask, &savemask)); + sigmask = savemask; pthread_t thread; const int err = pthread_create(&thread, &attr, StartIoThreadMain, nullptr); |