Changeset 164b0e54


Ignore:
Timestamp:
Jul 26, 2011 1:27:40 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1061e86
Parents:
02bc228
Message:
  • Watchdog: Improve the way it calls for a thread dump
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterWatchdog.java

    r02bc228 r164b0e54  
    11package net.i2p.router;
     2
     3import java.io.File;
    24
    35import net.i2p.data.DataHelper;
     
    106108                // It won't on windows, and we can't call i2prouter.bat either, it does something
    107109                // completely different...
    108                 if (System.getProperty("wrapper.version") != null && !System.getProperty("os.name").startsWith("Win")) {
     110                if (_context.hasWrapper() && !System.getProperty("os.name").startsWith("Win")) {
    109111                    ShellCommand sc = new ShellCommand();
    110                     boolean success = sc.executeSilentAndWaitTimed("./i2prouter dump", 10);
     112                    File i2pr = new File(_context.getBaseDir(), "i2prouter");
     113                    String[] args = new String[2];
     114                    args[0] = i2pr.getAbsolutePath();
     115                    args[1] = "dump";
     116                    boolean success = sc.executeSilentAndWaitTimed(args, 10);
    111117                    if (success)
    112118                        _log.log(Log.CRIT, "Threads dumped to wrapper log");
Note: See TracChangeset for help on using the changeset viewer.