本文整理汇总了TypeScript中tree-kill.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: kill
public kill() {
let treeKill = require("tree-kill");
treeKill(this.childProcess.pid, "SIGKILL");
const message = `Termination request was sent to process ${this.childProcess.pid} running command '${this.name}'.`;
this.outputChannel.appendLine(message);
}
示例2: term
function term() {
treeKill(process.pid, 'SIGTERM', function(err) {
if (err) {
vscode.window.showErrorMessage(`Failed to kill process with PID ${process.pid}.`);
} else {
process = null;
}
});
}
示例3: terminate
export function terminate (pid) {
const childCommand = childs.get(pid);
if (childCommand.child) {
outputChannel.appendLine('');
outputChannel.appendLine(`Killing process: ${childCommand.cmd} (pid:${pid})`);
outputChannel.appendLine('');
kill(pid, 'SIGTERM');
}
}
示例4: deactivate
export function deactivate() {
if (process) {
treeKill(process.pid, 'SIGTERM', function(err) {
if (err) {
treeKill(process.pid, 'SIGKILL');
}
process = null;
});
}
}
示例5: function
elc.app.on('before-quit', function(e: any) {
contextMenuTemplate[0].label = 'Shutting down...'
saveWinBounds()
setTimeout(function() {
elc.app.exit()
}, 3000) // Hard limit - if it doesn't shut down in 3 seconds, we force kill it.
const contextMenu = elc.Menu.buildFromTemplate(contextMenuTemplate)
tray.setContextMenu(contextMenu)
// console.log('before-quit: electron is quitting. ')
globals.AppIsShuttingDown = true
if (win !== null) {
win.close()
}
e.preventDefault()
globals.FrontendDaemon.on('exit', function() {
console.log('Frontend has exited.')
elc.app.exit()
})
treekill(globals.FrontendDaemon.pid)
metrics.SendRaw('App shut down')
})
示例6: Promise
return new Promise((resolve, reject) => {
kill(processId, 'SIGKILL', (err: any) => {
err ? reject(err) : resolve();
});
});
示例7: treeKill
_processes.forEach(process => treeKill(process.pid, signal));
示例8: treeKill
const killForkedProcess = () => {
if (forkedProcess && forkedProcess.pid) {
treeKill(forkedProcess.pid, 'SIGTERM');
}
};
示例9: treeKill
treeKill(process.pid, 'SIGTERM', function(err) {
if (err) {
treeKill(process.pid, 'SIGKILL');
}
process = null;
});
示例10: Promise
new Promise((resolve) => kill(gotifyInstance.pid, 'SIGKILL', () => resolve())),