The JVM manages this - there are many options:
- reading a flag - patching the running - changing memory protection and causing a segfault
ptrace it?