summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-11-13 21:12:48 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2019-11-15 15:39:31 +0100
commit6df0bb7d382fa7a6043fc7e9587889d3b53976b7 (patch)
treee0fa65ed84199f0f62b097c3e481a550def6c4bc /client/mysqltest.cc
parent89ae01fd0085cf0d1af272eca545e49fdadf4538 (diff)
downloadmariadb-git-6df0bb7d382fa7a6043fc7e9587889d3b53976b7.tar.gz
MDEV-21062 Buildbot, Windows - sporadically missing lines from mtr's "exec"
Provide own version of popen/pclose, in attempt to workaround sporadic erratic behavior of UCRT's one.
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 3e61b2ec9b7..bb59e5fd42f 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -872,14 +872,6 @@ static char *my_fgets(char * s, int n, FILE * stream, int *len)
return buf;
}
-/*
- Wrapper for popen().
-*/
-static FILE* my_popen(const char *cmd, const char *mode)
-{
- return popen(cmd, mode);
-}
-
#ifdef EMBEDDED_LIBRARY
#define EMB_SEND_QUERY 1
@@ -1854,7 +1846,7 @@ static int run_command(char* cmd,
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
DBUG_RETURN(WEXITSTATUS(error));
}
@@ -3440,7 +3432,7 @@ void do_exec(struct st_command *command)
{
replace_dynstr_append_mem(ds_result, buf, len);
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
if (display_result_sorted)
{
@@ -4670,7 +4662,7 @@ void do_perl(struct st_command *command)
replace_dynstr_append_mem(&ds_res, buf, len);
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
/* Remove the temporary file, but keep it if perl failed */
if (!error)