Changeset 5923


Ignore:
Timestamp:
2003-11-20T17:41:35+13:00 (20 years ago)
Author:
mdewsnip
Message:

(This is not me committing - it is John!!)

Added a sleep within the stream reading loop, as it was sometimes being greedy with processor time and not letting low-output scripts do anyting (ie makecol and exportcol)

ps. This actually is Michael pretending to be John

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GShell.java

    r5908 r5923  
    215215        }
    216216        // Hopefully this won't block if the process is trying to write to STDERR
    217         if(stdisr.ready()) {
     217        else if(stdisr.ready()) {
    218218            int c = stdisr.read();
    219219            if(c == '\n' || c == '\r') {
     
    228228            else {
    229229            stdline_buffer.append((char)c);
     230            }
     231        }
     232        else {
     233            try {
     234            sleep(100);
     235            }
     236            catch(Exception exception) {
    230237            }
    231238        }
Note: See TracChangeset for help on using the changeset viewer.