private boolean restart(Integer exitValue, boolean receivedRestartMsg) throws Exception {
        if (maxProcessRestarts > -1 && numRestarts >= maxProcessRestarts) {
            LOG.warn("Hit the maximum number of process restarts. Driver is shutting down now.");
            stop();
            return false;
        }
        LOG.warn("Must restart process (exitValue={} numRestarts={} receivedRestartMessage={})", exitValue, numRestarts, receivedRestartMsg);
        stop();
        start();
        numRestarts++;
        loopsAfterRestartMessageReceived = 0;
        return true;
    }
Tries to restart (stop and then start) the forked process

@return whether or not this was successful, will be false if numRestarts >= maxProcessRestarts
@throws Exception
tika-batch/src/main/java/org/apache/tika/batch/BatchProcessDriverCLI.java