projects
/
m6w6
/
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-12
[m6w6/libmemcached]
/
libtest
/
cmdline.cc
diff --git
a/libtest/cmdline.cc
b/libtest/cmdline.cc
index 6fc34031b95b319ce121b0a62fe54f8c14292a5f..6b8205cb1fff276fe8d02ccb172fd123e4329541 100644
(file)
--- a/
libtest/cmdline.cc
+++ b/
libtest/cmdline.cc
@@
-36,6
+36,11
@@
using namespace libtest;
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
+#include <unistd.h>
+
+#ifndef __USE_GNU
+static char **environ= NULL;
+#endif
extern "C" {
static int exited_successfully(int status)
extern "C" {
static int exited_successfully(int status)
@@
-108,6
+113,7
@@
Application::Application(const std::string& arg, const bool _use_libtool_arg) :
_use_valgrind(false),
_use_gdb(false),
_use_ptrcheck(false),
_use_valgrind(false),
_use_gdb(false),
_use_ptrcheck(false),
+ _will_fail(false),
_argc(0),
_exectuble(arg),
stdin_fd(STDIN_FILENO),
_argc(0),
_exectuble(arg),
stdin_fd(STDIN_FILENO),
@@
-247,7
+253,10
@@
Application::error_t Application::run(const char *args[])
if (spawn_ret != 0)
{
if (spawn_ret != 0)
{
- Error << strerror(spawn_ret) << "(" << spawn_ret << ")";
+ if (_will_fail == false)
+ {
+ Error << strerror(spawn_ret) << "(" << spawn_ret << ")";
+ }
_pid= -1;
return Application::INVALID;
}
_pid= -1;
return Application::INVALID;
}
@@
-533,7
+542,7
@@
void Application::Pipe::reset()
close(READ);
close(WRITE);
close(READ);
close(WRITE);
-#if
_GNU_SOURCE
+#if
HAVE_PIPE2
if (pipe2(_pipe_fd, O_NONBLOCK) == -1)
#else
if (pipe(_pipe_fd) == -1)
if (pipe2(_pipe_fd, O_NONBLOCK) == -1)
#else
if (pipe(_pipe_fd) == -1)
@@
-787,4
+796,9
@@
const char *gearmand_binary()
return GEARMAND_BINARY;
}
return GEARMAND_BINARY;
}
+const char *drizzled_binary()
+{
+ return DRIZZLED_BINARY;
+}
+
} // namespace exec_cmdline
} // namespace exec_cmdline