On Tue, 9 May 2023 20:49:16 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adjusting build script as suggested on the review. > > src/jdk.internal.le/linux/native/lible/CLibrary.cpp line 183: > >> 181: JNIEXPORT jint JNICALL >> Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_isatty >> 182: (JNIEnv *, jobject, jint fd) { >> 183: return isatty(fd); > > Do we care if the native `isatty()` returns zero? Or is this dealt with > somewhere else? This method is only used to determine with the fd is attached to a terminal (returns 1) or not (return 0). The reasons why it is not attached to a terminal are not really important. The value is used here: https://github.com/lahodaj/jdk/blob/4cf8f67e43f442a5c48cd30349740ac2cb638d6e/src/jdk.internal.le/unix/classes/jdk/internal/org/jline/terminal/impl/jna/JnaNativePty.java#L186 > src/jdk.internal.le/macosx/native/lible/CLibrary.cpp line 187: > >> 185: JNIEXPORT jint JNICALL >> Java_jdk_internal_org_jline_terminal_impl_jna_osx_CLibraryImpl_isatty >> 186: (JNIEnv *, jobject, jint fd) { >> 187: return isatty(fd); > > Do we care if the native `isatty()` returns zero? Or is this dealt with > somewhere else? This method is only used to determine with the fd is attached to a terminal (returns 1) or not (return 0). The reasons why it is not attached to a terminal are not really important. The value is used here: https://github.com/lahodaj/jdk/blob/4cf8f67e43f442a5c48cd30349740ac2cb638d6e/src/jdk.internal.le/unix/classes/jdk/internal/org/jline/terminal/impl/jna/JnaNativePty.java#L186 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13687#discussion_r1190739079 PR Review Comment: https://git.openjdk.org/jdk/pull/13687#discussion_r1190741351