MCPcopy Index your code
hub / github.com/nodejs/node / onexit

Function onexit

test/async-hooks/test-shutdownwrap.js:53–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51process.on('exit', onexit);
52
53function onexit() {
54 hooks.disable();
55 hooks.sanityCheck('SHUTDOWNWRAP');
56 const as = hooks.activitiesOfTypes('SHUTDOWNWRAP');
57 const a = as[0];
58 assert.strictEqual(a.type, 'SHUTDOWNWRAP');
59 assert.strictEqual(typeof a.uid, 'number');
60 assert.strictEqual(typeof a.triggerAsyncId, 'number');
61 checkInvocations(as[0], { init: 1, before: 1, after: 1, destroy: 1 },
62 'when process exits');
63}

Callers

nothing calls this directly

Calls 3

sanityCheckMethod · 0.80
activitiesOfTypesMethod · 0.80
disableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…