Changeset 17531 for gsdl/trunk/perllib/downloaders/WgetDownload.pm
- Timestamp:
- 2008-10-14T18:12:20+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/downloaders/WgetDownload.pm
r17529 r17531 82 82 # up before ending the child process. 83 83 my $childpid; 84 my ($chld_out, $chld_in);84 my ($chld_out, $chld_in); 85 85 my ($serverSocket, $read_set); 86 87 # The port this script's server socket will be listening on, to handle 88 # incoming signals from GLI to terminate wget. This is also file global, 89 # since OAIDownload.pm will make several calls on wget using the same 90 # instance of this script and we want to reuse whatever port GLI gave us. 91 my $port; 86 92 87 93 # When this script is called from the command line, this handler will be called … … 202 208 # Instead, when wget has to be terminated in the middle of execution, GLI will 203 209 # connect to a serverSocket here to communicate when it's time to stop wget. 204 my $port; 205 if(defined $self->{'gli'} && $self->{'gli'}) { 210 if(defined $self->{'gli'} && $self->{'gli'} && !defined $port) { 206 211 207 212 $port = <STDIN>; # gets a port on localhost that's not yet in use … … 235 240 } 236 241 else { # wget finished, terminate naturally 237 print STDERR "\nPerl: open2 command, input stream closed. Wget terminated naturally.\n";242 #print STDERR "\nPerl: open2 command, input stream closed. Wget terminated naturally.\n"; 238 243 close($chld_in); 239 244 close($chld_out);
Note:
See TracChangeset
for help on using the changeset viewer.