angelbbs / NiceHashMinerLegacy

NiceHash Miner Legacy Fork Fix
Other
72 stars 16 forks source link

Close t-rex miner gracefully #134

Closed TimSirmovics closed 2 years ago

TimSirmovics commented 2 years ago

T-rex miner can take a parameter --lock-cclock to lock the core clock to a specific value. If T-rex miner is terminated, and not exited by sending a Ctrl+C, the core clock is not unlocked and remains at it's locked value after the program has exited.

When NHML switches algorithms or stops mining it sends a process.Kill(); which immediately closes t-rex and does not allow it to unlock the core clock. Can this be changed to try and send a process.CloseMainWindow(); first to allow the miner to exit and unlock the core clock?