I\'m creating subprocesses in this way:
String command = new String(\"some_program\"); Process p = Runtime.getRuntime().exec(command);
How
Trivial on linux:
String pid = new File("/proc/self").getCanonicalFile().getName();