MCPcopy Index your code
hub / github.com/coder/code-server / constructor

Function constructor

src/node/wrapper.ts:111–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 public abstract logger: Logger
110
111 public constructor() {
112 process.on("SIGINT", () => this._onDispose.emit("SIGINT"))
113 process.on("SIGTERM", () => this._onDispose.emit("SIGTERM"))
114 process.on("exit", () => this._onDispose.emit(undefined))
115
116 this.onDispose((signal, wait) => {
117 // Remove listeners to avoid possibly triggering disposal again.
118 process.removeAllListeners()
119
120 // Try waiting for other handlers to run first then exit.
121 this.logger.debug("disposing", field("code", signal))
122 wait.then(() => this.exit(0))
123 setTimeout(() => this.exit(0), 5000)
124 })
125 }
126
127 /**
128 * Ensure control over when the process exits.

Callers

nothing calls this directly

Calls 1

emitMethod · 0.80

Tested by

no test coverage detected