|
@@ -240,9 +240,11 @@ public class TestShell extends Assert {
|
|
expectedCommand =
|
|
expectedCommand =
|
|
new String[]{getWinUtilsPath(), "task", "isAlive", anyPid };
|
|
new String[]{getWinUtilsPath(), "task", "isAlive", anyPid };
|
|
} else if (Shell.isSetsidAvailable) {
|
|
} else if (Shell.isSetsidAvailable) {
|
|
- expectedCommand = new String[] {"kill", "-0", "--", "-" + anyPid };
|
|
|
|
|
|
+ expectedCommand = new String[] { "bash", "-c", "kill -0 -- -'" +
|
|
|
|
+ anyPid + "'"};
|
|
} else {
|
|
} else {
|
|
- expectedCommand = new String[] {"kill", "-0", anyPid };
|
|
|
|
|
|
+ expectedCommand = new String[] {"bash", "-c", "kill -0 '" + anyPid +
|
|
|
|
+ "'" };
|
|
}
|
|
}
|
|
Assert.assertArrayEquals(expectedCommand, checkProcessAliveCommand);
|
|
Assert.assertArrayEquals(expectedCommand, checkProcessAliveCommand);
|
|
}
|
|
}
|
|
@@ -260,9 +262,11 @@ public class TestShell extends Assert {
|
|
expectedCommand =
|
|
expectedCommand =
|
|
new String[]{getWinUtilsPath(), "task", "kill", anyPid };
|
|
new String[]{getWinUtilsPath(), "task", "kill", anyPid };
|
|
} else if (Shell.isSetsidAvailable) {
|
|
} else if (Shell.isSetsidAvailable) {
|
|
- expectedCommand = new String[] {"kill", "-9", "--", "-" + anyPid };
|
|
|
|
|
|
+ expectedCommand = new String[] { "bash", "-c", "kill -9 -- -'" + anyPid +
|
|
|
|
+ "'"};
|
|
} else {
|
|
} else {
|
|
- expectedCommand = new String[] {"kill", "-9", anyPid };
|
|
|
|
|
|
+ expectedCommand = new String[]{ "bash", "-c", "kill -9 '" + anyPid +
|
|
|
|
+ "'"};
|
|
}
|
|
}
|
|
Assert.assertArrayEquals(expectedCommand, checkProcessAliveCommand);
|
|
Assert.assertArrayEquals(expectedCommand, checkProcessAliveCommand);
|
|
}
|
|
}
|