Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-06-07 23:07:02 +0300
committerAnna Henningsen <anna@addaleax.net>2018-06-13 13:23:36 +0300
commitaa2304b8d5c53ba2d9710d8b8ed4482f3cbd1192 (patch)
tree4bd93c9dd7f8a5fa0e04c4897b8e0aa7c1075225 /src/spawn_sync.cc
parent8e2d33f15620013de504c1181641aa961906f436 (diff)
worker,src: display remaining handles if `uv_loop_close` fails
Right now, we crash the process if there are handles remaining on the event loop when we exit (except for the main thread). This does not provide a lot of information about causes, though; in particular, we don’t show which handles are pending and who own them. This patch adds debug output to these cases to help with the situation. PR-URL: https://github.com/nodejs/node/pull/21238 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/spawn_sync.cc')
-rw-r--r--src/spawn_sync.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 8bc50c7586c..edfa2dfcf57 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "spawn_sync.h"
+#include "debug_utils.h"
#include "env-inl.h"
#include "string_bytes.h"
#include "util.h"
@@ -528,7 +529,7 @@ void SyncProcessRunner::CloseHandlesAndDeleteLoop() {
if (r < 0)
ABORT();
- CHECK_EQ(uv_loop_close(uv_loop_), 0);
+ CheckedUvLoopClose(uv_loop_);
delete uv_loop_;
uv_loop_ = nullptr;