[jdk23] RFR: 8334433: jshell.exe runs an executable test.exe on startup
Jan Lahoda
jlahoda at openjdk.org
Fri Jun 28 12:25:51 UTC 2024
Hi all,
This pull request contains a backport of commit [99d2bbf7](https://github.com/openjdk/jdk/commit/99d2bbf767ac33e1a021c90ba12d95ef37ea4816) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
The commit being backported was authored by Jan Lahoda on 28 Jun 2024 and was reviewed by Jaikiran Pai.
Thanks!
Original description:
JLine has multiple providers that can setup and work with the native terminals. As part of an upgrade to JLine 3.26.1 (https://github.com/openjdk/jdk/pull/18142), a first phase of checks in the terminal providers providers runs fairly soon, when the providers are gathered. There is also a provider which setups the terminals using command line utilities - the "exec" provider. And this provider currently runs the "test" command line utility during the gathering phase, which (I believe) was not the case in previous version. I.e. even if some other provider is used to work with the terminal, the "exec" terminal might run the "test" utility anyway.
We currently largely don't need the "exec" provider at all - we currently primarily use a semi-native provider based on FFM. The "exec" provider is, I believe, used on platforms for which the FFM provider is not implemented, which is probably primarily AIX.
The proposal herein is twofold:
- disable the "exec" terminal on platforms for the FFM provider should work (Windows, Linux, Mac)
- make the "exec" provider ignore the PATH environment variable, and use hardcoded value.
I tested this on Windows with cmd, Cygwin and MSYS, and on Linux and seemed to work fine.
@MBaesken, please let me know what you think of this change.
I would like to backport this to JDK 23.
-------------
Commit messages:
- Backport 99d2bbf767ac33e1a021c90ba12d95ef37ea4816
Changes: https://git.openjdk.org/jdk/pull/19939/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19939&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8334433
Stats: 103 lines in 3 files changed: 101 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/19939.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19939/head:pull/19939
PR: https://git.openjdk.org/jdk/pull/19939
More information about the kulla-dev
mailing list