Runtime.exec() bug: hangs without providing a Process object

前端 未结 4 1223
不知归路
不知归路 2020-12-05 05:37

Whether I use this:

process = Runtime.getRuntime().exec(\"logcat -d time\");

or that:

process = new ProcessBuilder()
               


        
4条回答
  •  无人及你
    2020-12-05 06:13

    I have the same problem on ICS (seem to works fine on Android < 4). Did you find a solution?

    A simple workaround could be to call the "exec" method in a dedicated thread with a timeout-join so that this situation could be "detected" (yes I know it's not very elegant...)

提交回复
热议问题