@Override
    public void run() {
        try {
            while (true) {
                synchronized (lock) {
                    long elapsed = System.currentTimeMillis() - since;
                    if (parsing && elapsed > serverParseTimeoutMillis) {
                        LOG.warn("timeout server; elapsed {}  with {}", elapsed,
                                serverParseTimeoutMillis);
                        exit(TIMEOUT_EXIT_CODE);
                    } else if (!parsing && serverWaitTimeoutMillis > 0 &&
                            elapsed > serverWaitTimeoutMillis) {
                        LOG.info("closing down from inactivity");
                        exit(0);
                    }
                }
                Thread.sleep(checkForTimeoutMs);
            }
        } catch (InterruptedException e) {
            LOG.debug("interrupted");
        }
    }
This server is forked from the PipesClient.  This class isolates
parsing from the client to protect the primary JVM.
<p>
When configuring logging for this class, make absolutely certain
not to write to STDOUT.  This class uses STDOUT to communicate with
the PipesClient.
tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java