Ignore:
Timestamp:
2017-04-07T18:53:23+12:00 (7 years ago)
Author:
ak19
Message:

More equalising of debugging between the gli and gs3 src code versions of SafeProcess.java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/SafeProcess.java

    r31593 r31594  
    116116
    117117        // http://stackoverflow.com/questions/5283444/convert-array-of-strings-into-a-string-in-java
    118         ///System.err.println("SafeProcess running: " + Arrays.toString(command_args));
     118        System.err.println("SafeProcess running: " + Arrays.toString(command_args));
     119        ///logger.info("SafeProcess running: " + Arrays.toString(command_args));
    119120
    120121        if(this.envp == null) {
     
    123124           
    124125            if(this.dir == null) {
     126            ///logger.info("\twith: " + Arrays.toString(this.envp));
    125127            ///System.err.println("\twith: " + Arrays.toString(this.envp));
    126128            prcs = rt.exec(this.command_args, this.envp);
    127129            } else {
    128             //System.err.println("\tfrom directory: " + this.dir);
    129             //System.err.println("\twith: " + Arrays.toString(this.envp));
     130            ///logger.info("\tfrom directory: " + this.dir);
     131            ///logger.info("\twith: " + Arrays.toString(this.envp));
     132            ///System.err.println("\tfrom directory: " + this.dir);
     133            ///System.err.println("\twith: " + Arrays.toString(this.envp));
    130134            prcs = rt.exec(this.command_args, this.envp, this.dir);
    131135            }
     
    265269}
    266270
    267 // write your own run() body for any StreamGobbler
     271// Write your own run() body for any StreamGobbler. You need to create an instance of a class
     272// implementing CustomProcessHandler for EACH IOSTREAM of the process that you want to handle.
     273// Do not create a single CustomProcessHandler instance and reuse it for all three streams,
     274// i.e. don't call SafeProcess' runProcess(x, x, x); It should be runProcess(x, y, z).
    268275// Make sure your implementation is threadsafe if you're sharing immutable objects between the threaded streams
    269276// example implementation is in the GS2PerlConstructor.SynchronizedProcessHandler class.
Note: See TracChangeset for help on using the changeset viewer.