mirror of
https://github.com/hinto-janai/gupax.git
synced 2024-12-23 03:19:21 +00:00
helper: always reset xmrig
GUI output before starting
This commit is contained in:
parent
e23ea89a28
commit
2e90b9803e
1 changed files with 6 additions and 1 deletions
|
@ -881,13 +881,18 @@ impl Helper {
|
|||
// 2. Input [sudo] pass, wipe, then drop.
|
||||
if cfg!(unix) {
|
||||
debug!("XMRig | Inputting [sudo] and wiping...");
|
||||
// 1d. Sleep to wait for [sudo]'s non-echo prompt (on Unix).
|
||||
// a) Sleep to wait for [sudo]'s non-echo prompt (on Unix).
|
||||
// this prevents users pass from showing up in the STDOUT.
|
||||
sleep!(3000);
|
||||
if let Err(e) = writeln!(pair.master, "{}", lock!(sudo).pass) { error!("XMRig | Sudo STDIN error: {}", e); };
|
||||
SudoState::wipe(&sudo);
|
||||
|
||||
// b) Reset GUI STDOUT just in case.
|
||||
debug!("XMRig | Clearing GUI output...");
|
||||
lock!(gui_api).output.clear();
|
||||
}
|
||||
|
||||
|
||||
// 3. Set process state
|
||||
debug!("XMRig | Setting process state...");
|
||||
let mut lock = lock!(process);
|
||||
|
|
Loading…
Reference in a new issue