Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-07-24 Thread alexander . matveev
Looks good. Thanks, Alexander On 7/24/20 12:39 PM, Andy Herrick wrote: looks good /Andy On 7/21/2020 2:27 PM, Alexey Semenyuk wrote: Hi Aleksei, Looks good! - Alexey On 7/21/2020 11:42 AM, Aleksei Voitylov wrote: Hi, This is the updated fix which checks if LD_LIBRARY_PATH has been chan

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-07-24 Thread Andy Herrick
looks good /Andy On 7/21/2020 2:27 PM, Alexey Semenyuk wrote: Hi Aleksei, Looks good! - Alexey On 7/21/2020 11:42 AM, Aleksei Voitylov wrote: Hi, This is the updated fix which checks if LD_LIBRARY_PATH has been changed during jpackage executions: http://cr.openjdk.java.net/~avoitylov/webr

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-07-24 Thread Aleksei Voitylov
Thanks Alexey for the review! Unless we need another review, would you sponsor the change? Thanks, -Aleksei On 21/07/2020 21:27, Alexey Semenyuk wrote: > Hi Aleksei, > > Looks good! > > - Alexey > > On 7/21/2020 11:42 AM, Aleksei Voitylov wrote: >> Hi, >> >> This is the updated fix which checks

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-07-21 Thread Alexey Semenyuk
Hi Aleksei, Looks good! - Alexey On 7/21/2020 11:42 AM, Aleksei Voitylov wrote: Hi, This is the updated fix which checks if LD_LIBRARY_PATH has been changed during jpackage executions: http://cr.openjdk.java.net/~avoitylov/webrev.8248239.03/ The fix stores hash from LD_LIBRARY_PATH in _JPAC

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-07-21 Thread Aleksei Voitylov
Hi, This is the updated fix which checks if LD_LIBRARY_PATH has been changed during jpackage executions: http://cr.openjdk.java.net/~avoitylov/webrev.8248239.03/ The fix stores hash from LD_LIBRARY_PATH in _JPACKAGE_LAUNCHER env variable. Until C++14 becomes mandatory for OpenJDK, a custom hash

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-06-26 Thread Alexey Semenyuk
Hi Aleksei, I think the idea of partial reading data from cfg file when the launcher is restarted has a flaw. It would be better if app launcher can detect if it was restarted and if it was, not read cfg file at all, but pass command line arguments as is in JLI_Launch(). Let my think on ideas

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-06-26 Thread Aleksei Voitylov
Hi Alexey, Thank you for looking into it. As far as using parent pid, it does not seem to work as example [1] demonstrates. The parent process remains the same after re-execution and does not become the current process. I checked passing arguments in the "ArgOption" section using several cases [2

Re: RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-06-24 Thread Alexey Semenyuk
Aleksei, If I get it right, the fix would not work for the case when there are `arguments` properties in `ArgOptions` section of a config file. Why not just check if the parent process is the same executable as the current one and if this is the case don't read data from the config file but pa

RFR: JDK-8248239: jpackage adds some arguments twice in case it is re-executed by JLI

2020-06-24 Thread Aleksei Voitylov
Hi, There are systems that update LD_LIBRARY_PATH or directly return JNI_TRUE in method RequiresSetenv(const char *jvmpath) from java_md.c file to request re-execution of the current executable. This leads to the fact that jpackage application adds some provided arguments twice. Bug: https://bugs