Ejemplo n.º 1
0
 public override void Dispose()
 {
     try
     {
         process.Kill();
     }
     catch
     {
         // Suppress any exception from here since there is nothing more we can do
     }
 }
Ejemplo n.º 2
0
 public void KillProcess(IProcessWrapper process, bool killChildren)
 {
     if (killChildren)
     {
         KillChildren((uint)process.Id);
     }
     else
     {
         process.Kill();
     }
 }
Ejemplo n.º 3
0
 public void KillProcess()
 {
     try
     {
         process.Kill();
     }
     catch
     {
         // Supress any exception from here since there is nothing more we can do
     }
 }
Ejemplo n.º 4
0
        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
            }
        }
Ejemplo n.º 5
0
        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));
        }