Kill a process started with Groovy execute ()

I can run Groovy scripts from Groovy using

proc = "cmd / c Groovy BillingServer.groovy" .execute (null, new file ("C: \"))

However, I cannot find a way to complete or kill the process. waitForOrKill(1)and destroy()“act” how they worked, but the external process continues to work. The call is exitValue()not made using

java.lang.IllegalThreadStateException: process did not exit

How to kill the process that I started?

+5
source share
1 answer

, cmd /c , . , cmd groovy, waitForOrKill() cmd, groovy . cmd /c groovy, waitForOrKill() .

+3

All Articles