Hi
I use B4j output in linux vps
I need kill special process in linux
My code is :
B4X:
Dim she As Shell
she.Initialize("shell","kill -HUP 29349",Null)
she.Run(300)
StartMessageLoop
But i have error for top code
org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "kill -HUP 29349" (in directory "."): error=2, No such file or directory)
The timeout command is only used to ensure a program that hangs does not hang up your process (it's a watchdog timer, see https://commons.apache.org/proper/commons-exec/tutorial.html). If you know kill is going to process (not hang), then the timeout value should be -1. As to how fast this run will depend on your system. If you use jShell with Wait For (see https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/#post-498109), you can easily launch several jShell's (even before previous ones are complete) and are only limited by system resources. Each jShell call will start a new shell and then processes your command, both of which will require memory and CPU resources.