mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:33:32 +03:00
Now uses sigsetjmp() and siglongjmp() to bail out from slow name lookups in
case a timeout is set. This seems to work. God knows if it is good enough or what kind of side-effects we introduce here and now. I'll close my eyes and cross my fingers. Hard.
This commit is contained in:
parent
4cfffd6c4a
commit
3c49b405de
3 changed files with 63 additions and 22 deletions
|
|
@ -72,6 +72,10 @@
|
|||
#include <inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETJMP_H
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SELECT
|
||||
#error "We can't compile without select() support!"
|
||||
#endif
|
||||
|
|
@ -120,6 +124,7 @@
|
|||
#ifdef KRB4
|
||||
#include "security.h"
|
||||
#endif
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef MALLOCDEBUG
|
||||
#include "memdebug.h"
|
||||
|
|
@ -143,6 +148,10 @@ RETSIGTYPE alarmfunc(int signal)
|
|||
{
|
||||
/* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */
|
||||
(void)signal;
|
||||
#ifdef HAVE_SIGSETJMP
|
||||
extern sigjmp_buf curl_jmpenv;
|
||||
siglongjmp(curl_jmpenv, 1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue