public override void Dispose() { try { process.Kill(); } catch { // Suppress any exception from here since there is nothing more we can do } }
public void KillProcess(IProcessWrapper process, bool killChildren) { if (killChildren) { KillChildren((uint)process.Id); } else { process.Kill(); } }
public void KillProcess() { try { process.Kill(); } catch { // Supress any exception from here since there is nothing more we can do } }
private void HandleTimeout(IProcessWrapper process) { Defaults.Logger.WriteDebugMessage("TIMEOUT!"); process.Kill(); Thread.Sleep(1000); //wait one second so that the process has time to exit if (OnError == OnError.Fail) { //exit code should only be set if we want the application to fail on error BuildFile.SetErrorState(); //set our ExitCode to non-zero so consumers know we errored } }
public override Task <bool> TryDelete(string id) { // TODO: We do not have a good way of cross-platform support to get all children of that process and then kill all of them. // We recommend that developers write a bootstrapper that waits for all underlying processes to exit and use the bootstrapper as the startup executable. try { _processWrapper.Kill(int.Parse(id)); return(Task.FromResult(true)); } catch (Exception e) { _logger.LogException(e); } return(Task.FromResult(false)); }