本文整理汇总了TypeScript中child_process.ChildProcess.kill方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ChildProcess.kill方法的具体用法?TypeScript ChildProcess.kill怎么用?TypeScript ChildProcess.kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类child_process.ChildProcess
的用法示例。
在下文中一共展示了ChildProcess.kill方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: callback
}, (err, results) => {
if (err) {
searchProcess.kill();
return callback(err);
}
callback(null, results);
searchProcess.kill();
});
示例2: end
public end() {
if (this.cameraProcess) {
this.cameraProcess.kill();
}
if (this.streamingProcess) {
this.streamingProcess.kill();
}
}
示例3: stopSsLocal
function stopSsLocal() {
if (!ssLocal) {
return Promise.resolve();
}
ssLocal.kill();
return Promise.resolve();
}
示例4: deactivate
export function deactivate() {
// If sbt was started by this extension, kill the process.
// FIXME: This will be a problem for other clients of this server.
if (sbtProcess) {
sbtProcess.kill()
}
}
示例5: forgeSpawnWrapper
process.stdin.on('data', (data) => {
if (data.toString().trim() === 'rs' && lastSpawned) {
console.info('\nRestarting App\n'.cyan);
(lastSpawned as any).restarted = true;
lastSpawned.kill('SIGTERM');
forgeSpawnWrapper();
}
});
示例6: disposeClient
private disposeClient() {
if (this._client) {
this.child.kill();
this.child = null;
this._client = null;
this.channels = Object.create(null);
}
}
示例7: stop
public stop() {
this.logger.log("-- Tsc Stopping --");
this.childTsc.kill();
return {
onComplete: (todoOnClose: () => void) => {
this.todoOnClose = todoOnClose;
},
};
}
示例8: dispose
dispose() {
if (this.nvim) {
this.nvim.quit();
}
if (this.process) {
this.process.kill();
}
}
示例9: cancel
cancel(): Promise<void> {
if (!this.peerflix) {
return Promise.resolve();
}
this.peerflix.kill('SIGTERM');
this.peerflix = null;
return Promise.resolve();
}
示例10: close
close() {
if (!this.debugProcess) {
this.call<DebuggerState>('Command', [{ name: 'halt' }], (err, state) => {
if (err) return logError('Failed to halt.');
this.call<DebuggerState>('Restart', [], (err, state) => {
if (err) return logError('Failed to restart.');
});
});
} else {
this.debugProcess.kill();
}
}