Home / Function/ teardownSIGTERMListener() — vite Function Reference

teardownSIGTERMListener() — vite Function Reference

Architecture documentation for the teardownSIGTERMListener() function in utils.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  b132705a_2802_75fc_0fe2_ef5fc567419d["teardownSIGTERMListener()"]
  031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"]
  b132705a_2802_75fc_0fe2_ef5fc567419d -->|defined in| 031bc221_67a8_c579_f2bf_bb30a08beeb2
  5c50110b_5c76_c14f_b1dd_3efd3df7f375["preview()"]
  5c50110b_5c76_c14f_b1dd_3efd3df7f375 -->|calls| b132705a_2802_75fc_0fe2_ef5fc567419d
  24ecf2a1_3c09_d451_76f3_9485b4e993f8["_createServer()"]
  24ecf2a1_3c09_d451_76f3_9485b4e993f8 -->|calls| b132705a_2802_75fc_0fe2_ef5fc567419d
  style b132705a_2802_75fc_0fe2_ef5fc567419d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/utils.ts lines 1719–1729

export const teardownSIGTERMListener = (
  callback: Parameters<typeof setupSIGTERMListener>[0],
): void => {
  sigtermCallbacks.delete(callback)
  if (sigtermCallbacks.size === 0) {
    process.off('SIGTERM', parentSigtermCallback)
    if (process.env.CI !== 'true') {
      process.stdin.off('end', parentSigtermCallback)
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does teardownSIGTERMListener() do?
teardownSIGTERMListener() is a function in the vite codebase, defined in packages/vite/src/node/utils.ts.
Where is teardownSIGTERMListener() defined?
teardownSIGTERMListener() is defined in packages/vite/src/node/utils.ts at line 1719.
What calls teardownSIGTERMListener()?
teardownSIGTERMListener() is called by 2 function(s): _createServer, preview.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free