Application::error_t Application::join()
{
pid_t waited_pid= waitpid(_pid, &_status, 0);
Application::error_t Application::join()
{
pid_t waited_pid= waitpid(_pid, &_status, 0);
- built_argv.push_back(strdup(libtool()));
- built_argv.push_back(strdup("--mode=execute"));
+ vchar::append(built_argv, libtool());
+ vchar::append(built_argv, "--mode=execute");
- built_argv.push_back(strdup("valgrind"));
- built_argv.push_back(strdup("--error-exitcode=1"));
- built_argv.push_back(strdup("--leak-check=yes"));
+ vchar::append(built_argv, "valgrind");
+ vchar::append(built_argv, "--error-exitcode=1");
+ vchar::append(built_argv, "--leak-check=yes");
- built_argv.push_back(strdup("--malloc-fill=A5"));
- built_argv.push_back(strdup("--free-fill=DE"));
+ vchar::append(built_argv, "--malloc-fill=A5");
+ vchar::append(built_argv, "--free-fill=DE");
std::string log_file= create_tmpfile("valgrind");
libtest::vchar_t buffer;
buffer.resize(1024);
int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str());
fatal_assert(length > 0 and size_t(length) < buffer.size());
std::string log_file= create_tmpfile("valgrind");
libtest::vchar_t buffer;
buffer.resize(1024);
int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str());
fatal_assert(length > 0 and size_t(length) < buffer.size());
- built_argv.push_back(strdup("valgrind"));
- built_argv.push_back(strdup("--error-exitcode=1"));
- built_argv.push_back(strdup("--tool=exp-ptrcheck"));
+ vchar::append(built_argv, "valgrind");
+ vchar::append(built_argv, "--error-exitcode=1");
+ vchar::append(built_argv, "--tool=exp-ptrcheck");
std::string log_file= create_tmpfile("ptrcheck");
libtest::vchar_t buffer;
buffer.resize(1024);
int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str());
fatal_assert(length > 0 and size_t(length) < buffer.size());
std::string log_file= create_tmpfile("ptrcheck");
libtest::vchar_t buffer;
buffer.resize(1024);
int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str());
fatal_assert(length > 0 and size_t(length) < buffer.size());