JDK-4250622 : RFE: Please provide access to process ID
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-06-29
  • Updated: 2001-11-05
  • Resolved: 2001-11-05
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 06/29/99


Feature request: given that all operating systems support the idea of a running process, and given that that abstraction exists in the JDK (java.lang.Process) and given that all processes are by their nature distinct from one another, it seems pretty easy to add the ability to get to the process ID in the core JDK.

This could be accomplished in one of two ways:
(a) public int getID() method in java.lang.Process
(b) hashcode() of java.lang.Process could return System's pid

Why: all sorts of reasons, but primarily at the moment we are implementing a log system that needs the process ID.
(Review ID: 84986) 
======================================================================

Comments
WORK AROUND Name: rlT66838 Date: 06/29/99 The workaround at the moment is to wrap the java program in an OS script (like a .sh or a .bat file), but this strikes me as faintly silly for a language that attempts to be a serious enterprise contender. ======================================================================
11-06-2004

EVALUATION Duplicate 4244896. -- iag@sfbay 2001-11-05
05-11-2001