RootShell: synchronize accesses to single shell

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-01-09 12:21:01 +01:00
parent 204755d689
commit 2785def37a

View File

@ -127,7 +127,7 @@ public class RootShell {
* @param command Command to run as root.
* @return The exit value of the last command run, or -1 if there was an internal error.
*/
public int run(final Collection<String> output, final String command)
public synchronized int run(final Collection<String> output, final String command)
throws ErrnoException, IOException, NoRootException {
ensureRoot();