MCPcopy Create free account
hub / github.com/mscdex/ssh2 / exit

Method exit

lib/Channel.js:248–264  ·  view source on GitHub ↗
(statusOrSignal, coreDumped, msg)

Source from the content-addressed store, hash-verified

246 }
247
248 exit(statusOrSignal, coreDumped, msg) {
249 if (!this.server)
250 throw new Error('Server-only method called in client mode');
251
252 if (this.type === 'session'
253 && this.writable
254 && this.outgoing.state === 'open') {
255 if (typeof statusOrSignal === 'number') {
256 this._client._protocol.exitStatus(this.outgoing.id, statusOrSignal);
257 } else {
258 this._client._protocol.exitSignal(this.outgoing.id,
259 statusOrSignal,
260 coreDumped,
261 msg);
262 }
263 }
264 }
265
266}
267

Callers 9

install.jsFile · 0.80
test-openssh.jsFile · 0.80
runCallChecksFunction · 0.80
failMsgFunction · 0.80
test-exec.jsFile · 0.80

Calls 2

exitStatusMethod · 0.80
exitSignalMethod · 0.80

Tested by

no test coverage detected