JDK-8003488 : (process) Provide Process.getPid()
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-11-15
  • Updated: 2017-05-17
  • Resolved: 2014-05-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b15Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Add a facility to query the id of a process created using Runtime.exec() or the ProcessBuilder api. Important note from Alan Bateman:

"You probably know this but a getPid and perhaps a getCurrentPid requires great care. We cannot assume
that it can be represented by an int or long, it needs to allow for environment that might not have the notion of process as we know it, also needs consideration of environment where they may be several VMs running in the same process. So lots of wriggle room in the spec, otherwise it will not be implementable everywhere. "