ros-infrastructure / buildfarm

Build scripts and notes for catkin debian build pipeline.
6 stars 15 forks source link

create a script which will kill all subprocesses if the top level script is killed by jenkins #112

Closed tfoote closed 11 years ago

tfoote commented 11 years ago

Jenkins seems to kill the top level script with a -9 argument as all it's subprocesses get orphaned.

If we fork a script with the PID of the parent. It can recursively kill all subprocesses of the original parent if the original parent goes away.

Probably polling ps and keeping track of subprocesses in the background then killing if the parent goes away. Checking the PID hasn't been reallocated.

This will become critical if we add timeouts, especially for the doc jobs.

dirk-thomas commented 11 years ago

Ticketed with cloudbees. Lets wait for their response for now.

tfoote commented 11 years ago

successfully deployed in a27db362c3a99df538837989897356b30714ed6d

dirk-thomas commented 11 years ago

Script added in 0f098e22338e6f3d4d6aa7736c6412eed4363aef.