From 526f3038a460405b28daf32745f5abaf2738d6d8 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 2 Sep 2016 15:45:08 +0200 Subject: [PATCH] Reduced gobblers wait time. --- src/fr/devinsy/util/cmdexec/CmdExec.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fr/devinsy/util/cmdexec/CmdExec.java b/src/fr/devinsy/util/cmdexec/CmdExec.java index 7f6fc49..8465567 100644 --- a/src/fr/devinsy/util/cmdexec/CmdExec.java +++ b/src/fr/devinsy/util/cmdexec/CmdExec.java @@ -34,7 +34,7 @@ import fr.devinsy.util.strings.StringListUtils; */ public class CmdExec { - private static final Logger logger = LoggerFactory.getLogger(CmdExec.class); + private static Logger logger = LoggerFactory.getLogger(CmdExec.class); private int exitValue; private String out; @@ -215,7 +215,7 @@ public class CmdExec // must wait them. while ((!outputGobbler.isOver()) || (!errorGobbler.isOver())) { - Thread.sleep(2); + Thread.sleep(1); } // Store messages. @@ -327,7 +327,6 @@ public class CmdExec /** * @throws CmdExecException * @throws Exception - * */ public static String run(final String... command) throws CmdExecException { @@ -361,8 +360,9 @@ public class CmdExec /** * Examples: * - * setfacl("sudo", "setfacl", "-m", "g:cpm:rwX", "/tmp/toto"); - * setfacl("sudo", "setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto"); + * run("sudo", "setfacl", "-m", "g:cpm:rwX", "/tmp/toto"); + * + * run("sudo", "setfacl", "-R", "-m", "g:cpm:rwX", "/tmp/toto"); * * @throws CmdExecException */ @@ -433,9 +433,9 @@ public class CmdExec /** * 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 */