Remove duplicated sanity check
This commit is contained in:
@@ -13,7 +13,6 @@ import kotlin.concurrent.withLock
|
|||||||
class RootSession : AutoCloseable {
|
class RootSession : AutoCloseable {
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "RootSession"
|
private const val TAG = "RootSession"
|
||||||
private const val INIT_CHECKPOINT = "$TAG initialized successfully"
|
|
||||||
|
|
||||||
private val monitor = ReentrantLock()
|
private val monitor = ReentrantLock()
|
||||||
private fun onUnlock() {
|
private fun onUnlock() {
|
||||||
@@ -68,12 +67,6 @@ class RootSession : AutoCloseable {
|
|||||||
private val stdout = ArrayList<String>()
|
private val stdout = ArrayList<String>()
|
||||||
private val stderr = ArrayList<String>()
|
private val stderr = ArrayList<String>()
|
||||||
|
|
||||||
init {
|
|
||||||
// check basic shell functionality very basically
|
|
||||||
val result = execQuiet("echo $INIT_CHECKPOINT")
|
|
||||||
checkOutput("echo", result, result.out.joinToString("\n").trim() != INIT_CHECKPOINT)
|
|
||||||
}
|
|
||||||
|
|
||||||
private val isAlive get() = shell.isAlive
|
private val isAlive get() = shell.isAlive
|
||||||
override fun close() {
|
override fun close() {
|
||||||
shell.close()
|
shell.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user