public static void stop(String[] args) {
        if (PREVENT_STOP) {
            LOG.info("preventStopMethod was set to true in the server config. I'm not stopping.");
        }
        // process service stop function
        try {
            Options options = getStopOptions();
            CommandLineParser cliParser = new DefaultParser();
            CommandLine line = cliParser.parse(options, args);
            LOG.debug("Seeing 'preventSystemExit' on stop's commandline; not exiting");
            if (line.hasOption("preventSystemExit")) {
                return;
            }
        } catch (org.apache.commons.cli.ParseException e) {
            LOG.error("Can't parse stop arguments: ", e);
            System.exit(-1);
        }

        for (TikaServerWatchDog watcher : WATCHERS) {
            try {
                watcher.close();
            } catch (Exception e) {
                LOG.warn("Exception trying to close watcher", e);
            }
        }
        System.exit(0);
    }
This value is set to the server's id in the forked process.
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerCli.java