curl-users
[ curl-Bugs-478780 ] libcurl doesn't restore SIGALRM handler
Date: Tue, 06 Nov 2001 09:33:39 -0800
Bugs item #478780, was opened at 2001-11-06 09:33
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=478780&group_id=976
Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: libcurl doesn't restore SIGALRM handler
Initial Comment:
libcurl uses alarm(2) on Unix-like systems to implement
timeouts. This alone is a little evil for a library as
you can't know what the application using the library
is using alarm(2) and/or SIGALRM for. Even more evil is
that libcurl obviously doesn't restore the handler for
SIGALRM after having finished its request. Further, a
running alarm(2) isn't restored, either.
Suggestion: use select/poll and non-blocking I/O on
Unix systems to implement timeouts, you will need this
for concurrent requests without threads, anyway.
In the particular case I had to debug, a PHP script
using cURL trashed apache's timeout handling leaving
apache processes behind without working timeouts
running forever. Apache's timeout implementation is
questionable, too ;-)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=478780&group_id=976
Received on 2001-11-06