B4J Question How to kill running process in PI2

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

Could i use jShell to kill already running process in PI2(raspbian) ? Or i need other method ...
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi
following code is OK!

B4X:
Sub Kill As Boolean
    Private sh As Shell
    sh.Initialize("shl", "sudo", Array As String("pkill","nodejs"))
    sh.WorkingDirectory="/home/pi/OpenPLC_v2"   
    sh.Run(1000)
    '
    sh.Initialize("shl", "sudo", Array As String("pkill","-f","./core/openplc"))
    sh.WorkingDirectory="/home/pi/OpenPLC_v2/core"   
    sh.Run(1000)
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…