B4J Question JShell and Process ID

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi all

In my app I start some Daemons max 10 they are controlled with CLI Commands.
Daemons can be on WIndows and Linux(PI)

Now I like to get the Process ID to check if one of the Daemons still running.
The daemons start Shell.Run(-1)
They all have the same name but start from a different location.

How can I get the Process ID to see if the Daemon's still running?

Sometimes I also have to kill the process and for Windows I think TaskKill PID and Linux Kill PID is the way to go.
Maybe there is a better option to do this.

Thanks for help.
 
Last edited:

Chris2

Active Member
Licensed User
I came across this recently which may help:

Sometimes I also have to kill the process and for Windows I think TaskKill PID and Linux Kill PID is the way to go.
Maybe there is a better option to do this.
Could you use UDP to send a 'Close' message to each?
 
Upvote 0
Top