Get the PID of a process started with a cloth launch command

How to get the PID of processes started by the cloth launch command. I want to track PID if I want to kill a process. What's the best way to handle this case?

+3


source to share


1 answer


This should work because the shell opened by the run command remains open when the echo command is executed:



run("mycommand & echo $!")

      

-1


source







All Articles