RFR 9: 8003488 Add Process.getPid

Ivan Gerasimov ivan.gerasimov at oracle.com
Thu May 22 14:44:13 UTC 2014


Hi Roger!

On 22.05.2014 17:49, roger riggs wrote:
> Hi,
>
> The webrev has been updated to more completely describe the pid:
> "The native process id is an identification number that the operating 
> system assigns to the process."
>
> Any other comments?
>
I assume it compiles fine, but in 
src/windows/native/java/lang/ProcessImpl_md.c:

258     DWORD pid = GetProcessId(handle);

GetProcessId requires an argument of type HANDLE, which is defined as void*.
Wouldn't it be better to explicitly cast jlong to HANDLE?

Sincerely yours,
Ivan

> Webrev: http://cr.openjdk.java.net/~rriggs/webrev-getpid-8003488/ 
> <http://cr.openjdk.java.net/%7Erriggs/webrev-getpid-8003488/>
> Issue: https://bugs.openjdk.java.net/browse/JDK-8003488
>
> Thanks, Roger
>
>
>




More information about the core-libs-dev mailing list