protected void ShutdownMiner(bool withCrtlC = false) { if (IsRunning) { Helpers.ConsolePrint(MinerTag(), ProcessTag() + " Shutting down miner"); } if (ProcessHandle != null) { try { if (withCrtlC) { ProcessHandle.SendCtrlC((uint)Process.GetCurrentProcess().Id); } else { ProcessHandle.Kill(); } } catch { } ProcessHandle.Close(); ProcessHandle = null; // sgminer needs to be removed and kill by PID if (IsKillAllUsedMinerProcs) { KillAllUsedMinerProcesses(); } } }
protected void Stop_cpu_ccminer_sgminer_nheqminer(MinerStopType willswitch) { if (IsRunning) { Helpers.ConsolePrint(MinerTAG(), ProcessTag() + " Shutting down miner"); } if (ProcessHandle != null) { try { ProcessHandle.Kill(); } catch { } ProcessHandle.Close(); ProcessHandle = null; // sgminer needs to be removed and kill by PID if (IsKillAllUsedMinerProcs) { KillAllUsedMinerProcesses(); } } }
virtual public void Stop(bool willswitch) { if (willswitch && AlgoNameIs("daggerhashimoto")) { // daggerhashimoto - we only "pause" mining Helpers.ConsolePrint(MinerDeviceName, "Pausing ethminer.."); ethminerLink.StopMining(); return; } Helpers.ConsolePrint(MinerDeviceName, "Shutting down miner"); if (ProcessHandle != null) { try { ProcessHandle.Kill(); } catch { } ProcessHandle.Close(); ProcessHandle = null; if (MinerDeviceName == "AMD_OpenCL") { KillSGMiner(); } } if (!willswitch && ethminerProcess != null) { try { ethminerProcess.Kill(); } catch { } ethminerProcess.Close(); ethminerProcess = null; } StartingUpDelay = false; PreviousTotalMH = 0.0; NotProfitable = true; //IsRunning = false; //CurrentAlgo = -1; }
virtual public void Stop() { if (ProcessHandle != null) { Helpers.ConsolePrint(MinerDeviceName, "Shutting down miner"); try { ProcessHandle.Kill(); } catch { } ProcessHandle.Close(); ProcessHandle = null; StartingUpDelay = false; PreviousTotalMH = 0.0; if (AlgoNameIs("daggerhashimoto")) { ER.Stop(); } else if (MinerDeviceName == "AMD_OpenCL") { KillSGMiner(); } } }
protected void Stop_cpu_ccminer_sgminer_nheqminer(MinerStopType willswitch) { if (IsRunning) { Helpers.ConsolePrint(MinerTAG(), ProcessTag() + " Shutting down miner"); } if (willswitch != MinerStopType.FORCE_END) { ChangeToNextAvaliablePort(); } if (ProcessHandle != null) { try { ProcessHandle.Kill(); } catch { } ProcessHandle.Close(); ProcessHandle = null; // sgminer needs to be removed and kill by PID if (DeviceType == DeviceType.AMD) { KillAllUsedMinerProcesses(); } } }