projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
jenkins-promote-staging-trunk-libmemcached-1
[awesomized/libmemcached]
/
libtest
/
gearmand.cc
diff --git
a/libtest/gearmand.cc
b/libtest/gearmand.cc
index bcb7f8aaba2d7bcd7d033d4bf534b14b5ece03d2..4a544f10b9671eeb35b5263e2ee4b069c40e440b 100644
(file)
--- a/
libtest/gearmand.cc
+++ b/
libtest/gearmand.cc
@@
-164,24
+164,25
@@
public:
return GEARMAND_BINARY;
}
return GEARMAND_BINARY;
}
- const char *pid_file_option()
- {
- return "--pid-file=";
- }
-
const char *daemon_file_option()
{
return "--daemon";
}
const char *daemon_file_option()
{
return "--daemon";
}
-
const char *log_file_option(
)
+
void log_file_option(Application& app, const std::string& arg
)
{
{
- return "--verbose=DEBUG --log-file=";
+ if (arg.empty() == false)
+ {
+ std::string buffer("--log-file=");
+ buffer+= arg;
+ app.add_option("--verbose=DEBUG");
+ app.add_option(buffer);
+ }
}
}
- const char *port_option()
+ bool has_log_file_option() const
{
{
- return
"--port="
;
+ return
true
;
}
bool is_libtool()
}
bool is_libtool()
@@
-194,27
+195,30
@@
public:
return true;
}
return true;
}
- bool build(int argc, const char *argv[]);
+ bool has_port_option() const
+ {
+ return true;
+ }
+
+ bool build(size_t argc, const char *argv[]);
};
};
-bool Gearmand::build(
in
t argc, const char *argv[])
+bool Gearmand::build(
size_
t argc, const char *argv[])
{
std::stringstream arg_buffer;
if (getuid() == 0 or geteuid() == 0)
{
{
std::stringstream arg_buffer;
if (getuid() == 0 or geteuid() == 0)
{
- a
rg_buffer << " -u root "
;
+ a
dd_option("-u", "root")
;
}
}
- a
rg_buffer << " --listen=localhost "
;
+ a
dd_option("--listen=localhost")
;
- for (
int x= 1
; x < argc ; x++)
+ for (
size_t x= 0
; x < argc ; x++)
{
{
- a
rg_buffer << " " << argv[x] << " "
;
+ a
dd_option(argv[x])
;
}
}
- set_extra_args(arg_buffer.str());
-
return true;
}
return true;
}