Skip to content

Commit e94747c

Browse files
author
Glyn Normington
committed
Document killjava script
1 parent 39a7dd5 commit e94747c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

resources/openjdk/diagnostics/killjava

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
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+
1722
require 'time'
1823

1924
$stdout.sync = true
@@ -35,6 +40,8 @@ module Kill
3540
end
3641

3742
begin
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}`

0 commit comments

Comments
 (0)