Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
azure-cloud-mining-script
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
azure-cloud-mining-script
Commits
3ab11077
There was an error fetching the commit references. Please try again later.
Commit
3ab11077
authored
6 years ago
by
Alejandro Domínguez
Browse files
Options
Downloads
Patches
Plain Diff
Force flush at the end of line
parent
40d38e76
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
xmrstak/config.tpl
+0
-8
0 additions, 8 deletions
xmrstak/config.tpl
xmrstak/jconf.cpp
+1
-12
1 addition, 12 deletions
xmrstak/jconf.cpp
xmrstak/misc/console.cpp
+3
-12
3 additions, 12 deletions
xmrstak/misc/console.cpp
xmrstak/misc/console.hpp
+0
-2
0 additions, 2 deletions
xmrstak/misc/console.hpp
with
4 additions
and
34 deletions
xmrstak/config.tpl
+
0
−
8
View file @
3ab11077
...
@@ -113,14 +113,6 @@ R"===(
...
@@ -113,14 +113,6 @@ R"===(
*/
*/
"daemon_mode" : false,
"daemon_mode" : false,
/*
* Buffered output control.
* When running the miner through a pipe, standard output is buffered. This means that the pipe won't read
* each output line immediately. This can cause delays when running in background.
* Set this option to true to flush stdout after each line, so it can be read immediately.
*/
"flush_stdout" : false,
/*
/*
* Output file
* Output file
*
*
...
...
This diff is collapsed.
Click to expand it.
xmrstak/jconf.cpp
+
1
−
12
View file @
3ab11077
...
@@ -52,7 +52,7 @@ using namespace rapidjson;
...
@@ -52,7 +52,7 @@ using namespace rapidjson;
*/
*/
enum
configEnum
{
enum
configEnum
{
aPoolList
,
sCurrency
,
bTlsSecureAlgo
,
iCallTimeout
,
iNetRetry
,
iGiveUpLimit
,
iVerboseLevel
,
bPrintMotd
,
iAutohashTime
,
aPoolList
,
sCurrency
,
bTlsSecureAlgo
,
iCallTimeout
,
iNetRetry
,
iGiveUpLimit
,
iVerboseLevel
,
bPrintMotd
,
iAutohashTime
,
bFlushStdout
,
bDaemonMode
,
sOutputFile
,
iHttpdPort
,
sHttpLogin
,
sHttpPass
,
bPreferIpv4
,
bAesOverride
,
sUseSlowMem
bDaemonMode
,
sOutputFile
,
iHttpdPort
,
sHttpLogin
,
sHttpPass
,
bPreferIpv4
,
bAesOverride
,
sUseSlowMem
};
};
struct
configVal
{
struct
configVal
{
...
@@ -73,7 +73,6 @@ configVal oConfigValues[] = {
...
@@ -73,7 +73,6 @@ configVal oConfigValues[] = {
{
iVerboseLevel
,
"verbose_level"
,
kNumberType
},
{
iVerboseLevel
,
"verbose_level"
,
kNumberType
},
{
bPrintMotd
,
"print_motd"
,
kTrueType
},
{
bPrintMotd
,
"print_motd"
,
kTrueType
},
{
iAutohashTime
,
"h_print_time"
,
kNumberType
},
{
iAutohashTime
,
"h_print_time"
,
kNumberType
},
{
bFlushStdout
,
"flush_stdout"
,
kTrueType
},
{
bDaemonMode
,
"daemon_mode"
,
kTrueType
},
{
bDaemonMode
,
"daemon_mode"
,
kTrueType
},
{
sOutputFile
,
"output_file"
,
kStringType
},
{
sOutputFile
,
"output_file"
,
kStringType
},
{
iHttpdPort
,
"httpd_port"
,
kNumberType
},
{
iHttpdPort
,
"httpd_port"
,
kNumberType
},
...
@@ -607,16 +606,6 @@ bool jconf::parse_config(const char* sFilename, const char* sFilenamePools)
...
@@ -607,16 +606,6 @@ bool jconf::parse_config(const char* sFilename, const char* sFilenamePools)
}
}
#endif // _WIN32
#endif // _WIN32
if
(
prv
->
configValues
[
bFlushStdout
]
->
IsBool
())
{
bool
bflush
=
prv
->
configValues
[
bFlushStdout
]
->
GetBool
();
printer
::
inst
()
->
set_flush_stdout
(
bflush
);
if
(
bflush
)
{
printer
::
inst
()
->
print_msg
(
L0
,
"Flush stdout forced."
);
}
}
std
::
string
ctmp
=
GetMiningCoin
();
std
::
string
ctmp
=
GetMiningCoin
();
std
::
transform
(
ctmp
.
begin
(),
ctmp
.
end
(),
ctmp
.
begin
(),
::
tolower
);
std
::
transform
(
ctmp
.
begin
(),
ctmp
.
end
(),
ctmp
.
begin
(),
::
tolower
);
...
...
This diff is collapsed.
Click to expand it.
xmrstak/misc/console.cpp
+
3
−
12
View file @
3ab11077
...
@@ -156,7 +156,6 @@ printer::printer()
...
@@ -156,7 +156,6 @@ printer::printer()
{
{
verbose_level
=
LINF
;
verbose_level
=
LINF
;
logfile
=
nullptr
;
logfile
=
nullptr
;
b_flush_stdout
=
false
;
}
}
bool
printer
::
open_logfile
(
const
char
*
file
)
bool
printer
::
open_logfile
(
const
char
*
file
)
...
@@ -193,11 +192,7 @@ void printer::print_msg(verbosity verbose, const char* fmt, ...)
...
@@ -193,11 +192,7 @@ void printer::print_msg(verbosity verbose, const char* fmt, ...)
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
fputs
(
buf
,
stdout
);
fputs
(
buf
,
stdout
);
fflush
(
stdout
);
if
(
b_flush_stdout
)
{
fflush
(
stdout
);
}
if
(
logfile
!=
nullptr
)
if
(
logfile
!=
nullptr
)
{
{
...
@@ -210,11 +205,7 @@ void printer::print_str(const char* str)
...
@@ -210,11 +205,7 @@ void printer::print_str(const char* str)
{
{
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
std
::
unique_lock
<
std
::
mutex
>
lck
(
print_mutex
);
fputs
(
str
,
stdout
);
fputs
(
str
,
stdout
);
fflush
(
stdout
);
if
(
b_flush_stdout
)
{
fflush
(
stdout
);
}
if
(
logfile
!=
nullptr
)
if
(
logfile
!=
nullptr
)
{
{
...
@@ -223,7 +214,7 @@ void printer::print_str(const char* str)
...
@@ -223,7 +214,7 @@ void printer::print_str(const char* str)
}
}
}
}
//Do a press any key for the windows folk. *insert any key joke here*
//
Do a press any key for the windows folk. *insert any key joke here*
#ifdef _WIN32
#ifdef _WIN32
void
win_exit
(
int
code
)
void
win_exit
(
int
code
)
{
{
...
...
This diff is collapsed.
Click to expand it.
xmrstak/misc/console.hpp
+
0
−
2
View file @
3ab11077
...
@@ -35,7 +35,6 @@ public:
...
@@ -35,7 +35,6 @@ public:
};
};
inline
void
set_verbose_level
(
size_t
level
)
{
verbose_level
=
(
verbosity
)
level
;
}
inline
void
set_verbose_level
(
size_t
level
)
{
verbose_level
=
(
verbosity
)
level
;
}
inline
void
set_flush_stdout
(
bool
status
)
{
b_flush_stdout
=
status
;
}
void
print_msg
(
verbosity
verbose
,
const
char
*
fmt
,
...);
void
print_msg
(
verbosity
verbose
,
const
char
*
fmt
,
...);
void
print_str
(
const
char
*
str
);
void
print_str
(
const
char
*
str
);
bool
open_logfile
(
const
char
*
file
);
bool
open_logfile
(
const
char
*
file
);
...
@@ -45,7 +44,6 @@ private:
...
@@ -45,7 +44,6 @@ private:
std
::
mutex
print_mutex
;
std
::
mutex
print_mutex
;
verbosity
verbose_level
;
verbosity
verbose_level
;
bool
b_flush_stdout
;
FILE
*
logfile
;
FILE
*
logfile
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment