HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: HTTrack crashes with SIGPIPE
Author: Xavier Roche
Date: 01/07/2004 18:35
 
> 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)
 
Reply Create subthread


All articles

Subject Author Date
HTTrack crashes with SIGPIPE

01/07/2004 18:04
Re: HTTrack crashes with SIGPIPE

01/07/2004 18:06
Re: HTTrack crashes with SIGPIPE

01/07/2004 18:35
Re: HTTrack crashes with SIGPIPE

01/08/2004 11:32




f

Created with FORUM 2.0.11