Disable timeouts when there are threads

This commit is contained in:
Giuseppe Scrivano 2013-07-12 00:53:27 +02:00
parent a528894d13
commit f29fded6f4
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2013-07-12 Giuseppe Scrivano <gscrivano@gnu.org>
* utils.c (run_with_timeout): abort when there are more threads.
2013-07-11 Tim Ruehsen <tim.ruehsen@gmx.de>
* gnutls.c (ssl_connect_wget): respect connect timeout.

View File

@ -2008,6 +2008,16 @@ run_with_timeout (double timeout, void (*fun) (void *), void *arg)
return false;
}
#ifdef ENABLE_THREADS
if (opt.jobs > 1)
{
/* XXX: FIXME. Support this functionality when there are
multiple threads. Do not translate the string. */
logputs (LOG_NOTQUIET, "\ntimeouts not (yet) supported with threads.\n");
abort ();
}
#endif
signal (SIGALRM, abort_run_with_timeout);
if (SETJMP (run_with_timeout_env) != 0)
{