@Override
        public void run() {
            if (pauseOnEarlyTermination < 0) {
                return;
            }
            long start = System.currentTimeMillis();
            long elapsed = System.currentTimeMillis() - start;
            while (elapsed < (pauseOnEarlyTermination + EXTRA_GRACE_PERIOD_MILLIS)) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    return;
                }
                elapsed = System.currentTimeMillis() - start;
            }
            LOG.error("Interrupter timed out; now calling System.exit.");
            System.exit(-1);
        }
Class that waits for input on System.in.  If this reads
EOF or if there is an exception from the parent's IO,
this will send a signal to shutdown the forked process.
<p>
This will call System.exit(-1) if the process
doesn't stop after {@link #pauseOnEarlyTermination}
milliseconds.
</p>
tika-batch/src/main/java/org/apache/tika/batch/Interrupter.java