001package org.codehaus.plexus.util.cli;
002
003public class ProcessHook extends Thread {
004
005        private final Process process;
006
007        public ProcessHook(Process process) {
008                super("CommandlineUtils process shutdown hook");
009                this.process = process;
010                this.setContextClassLoader(null);
011        }
012
013        @Override
014        public void run() {
015                process.destroy();
016        }
017}