[Slackbuilds-users] Uget issues

B Watson yalhcru at gmail.com
Tue May 24 08:25:19 UTC 2011

On 5/22/11, Ozan Türky1lmaz <ozan.turkyilmaz at gmail.com> wrote:

> Did you try send it to upstream? and I like to see the patch as well.
> I'm sure others as well.

I did send it upstream, the day before sending that mail to the list...
Finally heard back today, apparently they like it, it will be in the
next 1.7.x and eventually in 1.8.0 stable when it gets released.

The actual patch is a one-liner:

diff -Naur uget-1.6.4/uglib/UgPlugin-curl.c
--- uget-1.6.4/uglib/UgPlugin-curl.c   2011-03-27 22:10:11.000000000 -0400
+++ uget-1.6.4.patched//uglib/UgPlugin-curl.c   2011-05-21
16:45:24.000000000 -0400
@@ -280,6 +280,7 @@
   curl_code = CURLE_FAILED_INIT;

   // Common option ----------------------------------------------------------
+  curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
   curl_easy_setopt (curl, CURLOPT_URL, common->url);
   // setup scheme and it's related data (user & password)
   ug_plugin_curl_set_scheme (plugin, curl);

Basically, the libcurl docs state that, if libcurl is built without
c-ares support (e.g. the libcurl in slackware), the CURLOPT_NOSIGNAL
option needs to be set, otherwise slow DNS requests will cause the app
to segfault (due I suppose to the fact that there's no way to force a
SIGALRM to go to a particular thread in the Linux threading model?)

Docs here: http://curl.haxx.se/libcurl/c/libcurl-tutorial.html (see the
"Multi-threading Issues" section).

I will go ahead and submit an updated uget slackbuild (for 1.6.4)
including this patch. The segfaults seem to be gone with the patch (and
it seems to have no negative effect when DNS times out, I tested that).

In case you're wondering: unpatched uget 1.6.4 does have the same
problem as 1.6.1. I just didn't generate a diff for 1.6.1 (because I'll
be updating to 1.6.4 to fix a different bug that was in 1.6.1).

More information about the SlackBuilds-users mailing list