@Override
        public void run() {
            String line = null;
            try {
                LOG.trace("watcher starting to read");
                while ((line = reader.readLine()) != null && this.running) {
                    if (line.startsWith(BatchProcess.BATCH_CONSTANTS.BATCH_PROCESS_FATAL_MUST_RESTART.toString())) {
                        receivedRestartMsg = true;
                    }
                    LOG.info("BatchProcess: " + line);
                }
            } catch (IOException e) {
                LOG.trace("watcher io exception");
                //swallow ioe
            }
            LOG.trace("watcher done");
        }
Class that writes to the forked process
to force an interrupt in the forked process.
tika-batch/src/main/java/org/apache/tika/batch/BatchProcessDriverCLI.java