function killFirefox() {
      helper.removeEventListeners(listeners);
      if (firefoxProcess.pid && !firefoxProcess.killed && !firefoxClosed) {
        // Force kill chrome.
        try {
          if (process.platform === 'win32')
            childProcess.execSync(`taskkill /pid ${firefoxProcess.pid} /T /F`);
          else
            process.kill(-firefoxProcess.pid, 'SIGKILL');
        } catch (e) {
          // the process might have already stopped
        }
      }
      // Attempt to remove temporary profile directory to avoid littering.
      try {
        removeFolder.sync(temporaryProfileDir);
      } catch (e) { }
    }
function killFirefox() {
      helper.removeEventListeners(listeners);
      if (firefoxProcess.pid && !firefoxProcess.killed && !firefoxClosed) {
        // Force kill chrome.
        try {
          if (process.platform === 'win32')
            childProcess.execSync(`taskkill /pid ${firefoxProcess.pid} /T /F`);
          else
            process.kill(-firefoxProcess.pid, 'SIGKILL');
        } catch (e) {
          // the process might have already stopped
        }
      }
      // Attempt to remove temporary profile directory to avoid littering.
      try {
        removeFolder.sync(temporaryProfileDir);
      } catch (e) { }
    }
function killFirefox ( ) { helper . removeEventListeners ( listeners ) ; if ( firefoxProcess . pid && ! firefoxProcess . killed && ! firefoxClosed ) { // Force kill chrome. try { if ( process . platform === 'win32' ) childProcess . execSync ( ` ${ firefoxProcess . pid } ` ) ; else process . kill ( - firefoxProcess . pid , 'SIGKILL' ) ; } catch ( e ) { // the process might have already stopped } } // Attempt to remove temporary profile directory to avoid littering. try { removeFolder . sync ( temporaryProfileDir ) ; } catch ( e ) { } }
This method has to be sync to be used as 'exit' event handler.
This method has to be sync to be used as exit event handler .
Kills the chrome process