Reduced gobblers wait time.

This commit is contained in:
Christian P. MOMON 2016-09-02 15:45:08 +02:00
parent 39252d915f
commit 526f3038a4

View file

@ -34,7 +34,7 @@ import fr.devinsy.util.strings.StringListUtils;
*/ */
public class CmdExec public class CmdExec
{ {
private static final Logger logger = LoggerFactory.getLogger(CmdExec.class); private static Logger logger = LoggerFactory.getLogger(CmdExec.class);
private int exitValue; private int exitValue;
private String out; private String out;
@ -215,7 +215,7 @@ public class CmdExec
// must wait them. // must wait them.
while ((!outputGobbler.isOver()) || (!errorGobbler.isOver())) while ((!outputGobbler.isOver()) || (!errorGobbler.isOver()))
{ {
Thread.sleep(2); Thread.sleep(1);
} }
// Store messages. // Store messages.
@ -327,7 +327,6 @@ public class CmdExec
/** /**
* @throws CmdExecException * @throws CmdExecException
* @throws Exception * @throws Exception
*
*/ */
public static String run(final String... command) throws CmdExecException public static String run(final String... command) throws CmdExecException
{ {
@ -361,8 +360,9 @@ public class CmdExec
/** /**
* Examples: * Examples:
* *
* setfacl("sudo", "setfacl", "-m", "g:cpm:rwX", "/tmp/toto"); * run("sudo", "setfacl", "-m", "g:cpm:rwX", "/tmp/toto");
* setfacl("sudo", "setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto"); *
* run("sudo", "setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto");
* *
* @throws CmdExecException * @throws CmdExecException
*/ */
@ -433,9 +433,9 @@ public class CmdExec
/** /**
* Examples: * Examples:
* *
* setfacl("setfacl", "-m", "g:cpm:rwX", "/tmp/toto"); * run("setfacl", "-m", "g:cpm:rwX", "/tmp/toto");
* *
* setfacl("setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto"); * run("setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto");
* *
* @throws CmdExecException * @throws CmdExecException
*/ */