Commit 4bfc2445 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Update the "vtc_thread" for each test we run so that error exits

work as expected.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4744 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b4d362ec
......@@ -504,6 +504,7 @@ exec_file_thread(void *priv)
pe = priv;
vtc_thread = pthread_self();
parse_string(pe->buf, cmds, NULL, vltop);
old_err = vtc_error;
vtc_stop = 1;
......@@ -544,6 +545,7 @@ exec_file(const char *fn, unsigned dur)
AZ(pthread_mutex_lock(&vtc_mtx));
AZ(pthread_create(&pt, NULL, exec_file_thread, &pe));
i = pthread_cond_timedwait(&vtc_cond, &vtc_mtx, &ts);
vtc_thread = NULL;
if (i == 0) {
AZ(pthread_mutex_unlock(&vtc_mtx));
......@@ -649,7 +651,6 @@ main(int argc, char * const *argv)
AN(vtc_tmpdir);
AZ(mkdir(vtc_tmpdir, 0700));
macro_def(vltop, NULL, "tmpdir", vtc_tmpdir);
vtc_thread = pthread_self();
AZ(pthread_mutex_init(&vtc_mtx, NULL));
AZ(pthread_cond_init(&vtc_cond, NULL));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment