Re: Killing a process, spawned by another shell script using java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Killing a process, spawned by another shell script using java

Imesh Gunaratne-2
Hi Kavindu,

On Wed, Jun 14, 2017 at 12:34 PM, Kavindu Zoysa <[hidden email]> wrote:
Hi all, 

I am trying to use a micro service in a test scenario and I need to programmatically start and stop the micro services server.  Currently I am using a shell script to start the server with standard java commands and in order to obtain the database connections, I am using a docker container with mysql installed in the test environment. With this approach, need to figure out a way to stop the micro services server.  

​May be we can use the Microservices Runner to do this programmatically:


One approach is to write a command to take the process id and save it on a text file and use that process id to kill the process using java. Another approach is to use bash commands to kill the process using a shell script.

it will be great to have feedback on which approach to use. 

Thank you, 

Kavindu Gimhan Zoysa
Software Engineer | WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20063%200867" value="+94710630867" target="_blank">+94710630867

Imesh Gunaratne
WSO2 Inc:
T: +94 11 214 5345 M: +94 77 374 2057
W: TW: @imesh 
lean. enterprise. middleware

Dev mailing list
[hidden email]