RFR 9: 8003488 Add Process.getPid

Martin Buchholz martinrb at google.com
Mon May 12 20:47:22 UTC 2014


Thanks for taking on yet another task that has been on my TODO list for a
decade.

I decided many years ago that the "process identifier" should actually be a
string (or at least not something as constrained as an int), in keeping
with Java's OS-independent nature, even though all implementations may in
fact use an integer.  IIRC, Apollo computers used a hostname/int pair as a
process identifier, and such a convention may become popular again in the
future.

Furthermore, returning a string is in practice at least as convenient,
since the only thing you can typically do with a pid today is pass it as a
string to a system command like "kill".


On Mon, May 12, 2014 at 12:44 PM, roger riggs <roger.riggs at oracle.com>wrote:

> Please review and comment on this long requested addition to provide the
> native process id of a spawned Process.
>
> Webrev:  http://cr.openjdk.java.net/~rriggs/webrev-getpid-8003488/
> Issue:  https://bugs.openjdk.java.net/browse/JDK-8003488
>
> Thanks, Roger
>
>



More information about the core-libs-dev mailing list