RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

Thomas Stuefe stuefe at openjdk.org
Tue Jun 20 15:11:05 UTC 2023


On Tue, 20 Jun 2023 15:00:29 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   correct comment
>
> src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 139:
> 
>> 137:     ChildStuff c;
>> 138:     struct stat buf;
>> 139:     /* argv[1] contains the fd number to read all the child info */
> 
> I would prefer to also fix the use of `argc-1` below to match.  Its a pretty odd form and might trip someone later.

I wondered about this, it looked so deliberate. So I wondered whether jspawnhelper is used outside of the posix_spawn context, but cannot find anything. Maybe historic?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14531#discussion_r1235414109


More information about the core-libs-dev mailing list