| > When trying to harvest www.bs.dk, HTTrack consistently
dies
> after a while with a SIGPIPE
Humm weird.
The close() is issued when the callback "send-header"
returns 0. This should not happend ?
Anyway there seems to be a problem somewhere ; try this:
1. Add in the sig_brpipe() function, in htscore.c (around
line 2890) the following line:
signal(code, sig_brpipe);
that is --
void sig_brpipe( int code ) { // treat if necessary
signal(code, sig_brpipe);
}
This should ensure that the function re-registers itself
when encountering a SIGPIPE signal.
2. In the deletesoc() function, in htslib.c (around line
2390), change the first line of the function from:
if (soc!=INVALID_SOCKET) {
into:
if (soc!=INVALID_SOCKET && soc!=LOCAL_SOCKET_ID) {
This will ensure that close() is never called with an
invalid ID (LOCAL_SOCKET_ID is an invalid value used when
files are used - such as file:// objects)
| |