char resumerange[12]="";
struct UrlData *data = curl;
struct connectdata *conn;
+#ifdef HAVE_SIGACTION
+ struct sigaction sigact;
+#endif
if(!data || (data->handle != STRUCT_OPEN))
return CURLE_BAD_FUNCTION_ARGUMENT; /* TBD: make error codes */
buf = data->buffer; /* this is our buffer */
-#if 0
- signal(SIGALRM, alarmfunc);
+#ifdef HAVE_SIGACTION
+ sigaction(SIGALRM, NULL, &sigact);
+ sigact.sa_handler = alarmfunc;
+ sigact.sa_flags &= ~SA_RESTART;
+ sigaction(SIGALRM, &sigact, NULL);
#endif
/* Parse <url> */
failf(data, "Attempt to connect to broadcast address without socket broadcast flag or local firewall rule violated: %d",errno);
break;
#endif
-#ifdef EINTR
case EINTR:
failf(data, "Connection timeouted");
break;
-#endif
#if 0
case EAFNOSUPPORT:
failf(data, "Incorrect address family: %d",errno);