cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl in JNI context

From: Jason Pump <jason_at_healthdash.com>
Date: Fri, 15 Jul 2005 12:24:04 -0700

It could get the previous function pointer from sigset() and then
restore the signal handling afterwards. I guess it is probably setting
it to SIG_DFL so it shouldn't be any much expensive to restore the
original signal handler. However that could disturb code that is relying
on the current functionality, so some new option like
CURLOPT_RESTORE_SIGHANDLERS should probably be used. This is all
guessword, I haven't looked at any code or tested anything.

Lai, Andy wrote:

>In fact I did not set CURLOPT_NOSIGNAL, which is my bad. After setting it the problem also went away even if I did not restore the signal handler.
>
>In case CURLOPT_NOSIGNAL is not set, is it not supposed to change any signal handler after the curl_easy_perform? As of now I'm still not sure if this is a bug or not.
>
>Thanks
>andy
>
>
>
>-----Original Message-----
>From: curl-library-bounces_at_cool.haxx.se
>[mailto:curl-library-bounces_at_cool.haxx.se]On Behalf Of Daniel Stenberg
>Sent: Thursday, July 14, 2005 11:47 PM
>To: libcurl development
>Subject: RE: libcurl in JNI context
>
>
>On Thu, 14 Jul 2005, Lai, Andy wrote:
>
>
>
>>The signal handler for SIGPIPE is changed after the curl_easy_perform call
>>to a default one, which happens to kill the process.
>>
>>I fixed it by saving the current signal handler before curl_easy_perform and
>>then restore it after. The problem then went away.
>>
>>
>
>Are you saying that curl_easy_perform() removed your signal handler or that
>this is some kind of libcurl bug at least?
>
>Are you using CURLOPT_NOSIGNAL ?
>
>
>
Received on 2005-07-15