Changeset 17231 for gsdl/trunk/perllib


Ignore:
Timestamp:
2008-09-09T19:20:59+12:00 (16 years ago)
Author:
ak19
Message:

In subroutine quit_yaz(), while flushing yaz-client's outputstream, only print the residual contents of the outputstream if this is not pure whitespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/downloaders/Z3950Download.pm

    r17229 r17231  
    173173
    174174    # make sure nothing is being output by yaz
     175    # flush the yaz-client process' outputstream, else we'll be stuck in an infinite
     176    # loop waiting for the process to quit.
    175177    my $output = $self->{'YAZOUT'};
    176178    my $line;
    177     while (defined ($line = <$output>)) {
    178     print STDERR "***### $line";
     179    while (defined ($line = <$output>)) {
     180    if($line !~ m/\w/s) { # print anything other than plain whitespace in case it is important
     181        print STDERR "***### $line";
     182    }
    179183    }
    180184
Note: See TracChangeset for help on using the changeset viewer.