當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript tree-kill.default函數代碼示例

本文整理匯總了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);
    }
開發者ID:jirkafajfr,項目名稱:vscode-kitchen,代碼行數:7,代碼來源:process.ts

示例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;
    }
  });
}
開發者ID:bbenoist,項目名稱:vscode-shell,代碼行數:9,代碼來源:extension.ts

示例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');
    }
}
開發者ID:Gigitsu,項目名稱:vscode-npm,代碼行數:10,代碼來源:run-command.ts

示例4: deactivate

export function deactivate() {
  if (process) {
    treeKill(process.pid, 'SIGTERM', function(err) {
      if (err) {
        treeKill(process.pid, 'SIGKILL');
      }
      process = null;
    });
  }
}
開發者ID:bbenoist,項目名稱:vscode-shell,代碼行數:10,代碼來源:extension.ts

示例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')
})
開發者ID:nehbit,項目名稱:aether-public,代碼行數:21,代碼來源:mainmain.ts

示例6: Promise

 return new Promise((resolve, reject) => {
   kill(processId, 'SIGKILL', (err: any) => {
     err ? reject(err) : resolve();
   });
 });
開發者ID:nertofiveone,項目名稱:salesforcedx-vscode,代碼行數:5,代碼來源:commandExecutor.ts

示例7: treeKill

 _processes.forEach(process => treeKill(process.pid, signal));
開發者ID:fmalcher,項目名稱:angular-cli,代碼行數:1,代碼來源:process.ts

示例8: treeKill

 const killForkedProcess = () => {
   if (forkedProcess && forkedProcess.pid) {
     treeKill(forkedProcess.pid, 'SIGTERM');
   }
 };
開發者ID:DevIntent,項目名稱:angular-cli,代碼行數:5,代碼來源:run-module-as-observable-fork.ts

示例9: treeKill

 treeKill(process.pid, 'SIGTERM', function(err) {
   if (err) {
     treeKill(process.pid, 'SIGKILL');
   }
   process = null;
 });
開發者ID:bbenoist,項目名稱:vscode-shell,代碼行數:6,代碼來源:extension.ts

示例10: Promise

 new Promise((resolve) => kill(gotifyInstance.pid, 'SIGKILL', () => resolve())),
開發者ID:bradparks,項目名稱:server,代碼行數:1,代碼來源:setup.ts


注:本文中的tree-kill.default函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。