Added delay in windows closse of xmrigDaemon when an error occurs
This commit is contained in:
parent
de0183c284
commit
b4586bf40e
2 changed files with 9 additions and 2 deletions
|
@ -29,6 +29,8 @@
|
|||
#define WIN32_LEAN_AND_MEAN /* avoid including junk */
|
||||
#include <windows.h>
|
||||
#include <signal.h>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#endif
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
|
@ -55,7 +57,12 @@ int main(int argc, char **argv) {
|
|||
status = system(xmrigMinerPath.c_str());
|
||||
#ifdef WIN32
|
||||
} while (status == EINTR);
|
||||
|
||||
if (status == EINVAL) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
|
||||
}
|
||||
#else
|
||||
} while (WEXITSTATUS(status) == EINTR);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue