File tree Expand file tree Collapse file tree
resources/openjdk/diagnostics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ # Kill script for use as the parameter of OpenJDK's -XX:OnOutOfMemoryError.
18+ #
19+ # It should be placed in the buildpack diagnostic directory so it logs to
20+ # the same log file as the rest of the buildpack.
21+
1722require 'time'
1823
1924$stdout. sync = true
@@ -35,6 +40,8 @@ module Kill
3540end
3641
3742begin
43+ # Kill all processes whose parameters match -XX:OnOutOfMemoryError and the name of this script.
44+ # This script can be renamed as necessary without modifying its code.
3845 command = "pkill -9 -f .*-XX:OnOutOfMemoryError=.*#{ File . basename ( __FILE__ ) } "
3946 Kill . log ( "#{ __FILE__ } attempting to kill Java processes using `#{ command } `" )
4047 `#{ command } `
You can’t perform that action at this time.
0 commit comments