public void ClearError() { lock (lockobj) { try { if (cr != null) { cr.Kill(); cr.Dispose(); cr = null; } } catch (ImproperException) { Console.WriteLine("Caught improper exception due to invalid exit before"); } } }
/// <summary> /// Starts the Chef-Client run /// </summary> /// <param name="ChefArgs"></param> public void StartChef(string ChefArgs) { ValidateClientIPAddress(); lock (lockobj) { if (cr != null) { cr.Dispose(); cr = null; } cr = new ChefRunner(ChefArgs); cr.StartChef(); } }