Guest User

Untitled

a guest
May 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. if (proc !== null) {
  2.  
  3. proc.on("exit", (code, signal) => {
  4. done();
  5. });
  6.  
  7. var isWin = /^win/.test(process.platform);
  8. if (!isWin) {
  9. kill(proc.pid);
  10. } else {
  11. exec(`taskkill /PID ${proc.pid} /T /F`, (error, stdout, stderr) => {
  12. if (error !== null) {
  13. console.log('exec error: ' + error);
  14. }
  15. });
  16. }
  17. } else {
  18. done();
  19. }
Add Comment
Please, Sign In to add comment