8194734 : Handle to jimage file inherited into child processes (win)

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 6 18:11:03 UTC 2018


On 02/04/2018 22:50, Alexander Miloslavskiy wrote:
> The problem in this bug is that jimage file is mistakenly opened with 
> "inherit by child processes" flag. In our case, the child process is 
> started with Runtime.exec() and serves as updater that can also 
> replace embedded JRE. However, due to jimage ("lib/modules") file 
> handle being inherited, embedded JRE can not be replaced.
>
> The bug was introduced in commits "8087181: Move native jimage code to 
> its own library (maybe libjimage)"
cc'ing Jim Laskey as he recently picked up JDK-8194734.

The update to osSupport_Windows.cpp looks okay.  I think it would be 
useful to discuss the osSupport_unix.cpp change further as the childproc 
code is supported to close the file descriptors. Martin might know about 
this.

-Alan


More information about the core-libs-dev mailing list