src: avoid duplicate AtExit functions#8273
Conversation
|
LGTM |
|
Btw, everytime I’m doing something inside |
|
@addaleax +1. However, atleast on my mac, the compiler doesn't like the function passed to atexit to be a lambda. I didn't try too hard though. |
|
Yeah, it’s not that important anyway, was just a thought that occurred to me. |
|
+1 LGTM if CI is green! |
|
LGTM |
|
LGTM, one less minor irritant. |
|
CI was a bit too red: https://ci.nodejs.org/job/node-test-pull-request/3895/ |
node.cc had two functions with the name AtExit with entirely different purposes: * node::AtExit(): file static; used to register the atexit(3) handler for the Node process. * node::AtExit(void (*)(void*), void*): publicly exported symbol that addons can use to request callbacks upon exit. For code readability it is better to avoid the unintentional overload. PR-URL: nodejs#8273 Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
0daa665 to
becbcc7
Compare
|
Thanks, the new CI was good, landed as becbcc7. |
node.cc had two functions with the name AtExit with entirely different purposes: * node::AtExit(): file static; used to register the atexit(3) handler for the Node process. * node::AtExit(void (*)(void*), void*): publicly exported symbol that addons can use to request callbacks upon exit. For code readability it is better to avoid the unintentional overload. PR-URL: nodejs#8273 Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
node.cc had two functions with the name AtExit with entirely different purposes: * node::AtExit(): file static; used to register the atexit(3) handler for the Node process. * node::AtExit(void (*)(void*), void*): publicly exported symbol that addons can use to request callbacks upon exit. For code readability it is better to avoid the unintentional overload. PR-URL: #8273 Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
|
@ofrobots should this be backported? If so would you be able to submit a manual backport? |
|
No strong reason to backport this, specially if requires manual work :). |
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
src
Description of change
node.cchad two functions with the nameAtExitwith entirely differentpurposes:
node::AtExit(): file static; used to register theatexit(3)handlerfor the Node process.
node::AtExit(void (*)(void*), void*): publicly exported symbol thataddons can use to request callbacks upon exit.
For code readability it is better to avoid the unintentional overload.
R=@addaleax, @bnoordhuis
EDIT: CI: https://ci.nodejs.org/job/node-test-pull-request/3835/