Giter Club home page Giter Club logo

pty4j's Introduction

Pty4J - Pseudo terminal(PTY) implementation in Java.

official JetBrains project

Build Status

This is a Java implementation of PTY. Written in JNA with native code to make fork of a process.

It is based on two projects that provide the same functionality: JPty and elt.

While JPty is pretty good and written using only JNA it suffers from a hang on Mac OS X when Java is under debug (jawi/JPty#2), because fork doesn't work well in java.

elt works ok, but it has mostly native code(using JNI).

So this one is a mix of the other two: a port of elt to JNA in the style it is made in JPty with only fork and process exec written in native.

Also pty4j implements java interface for pty for windows, using WinPty library.

Dependencies

This library depends on JTermios, part of the PureJavaComm library found at https://github.com/nyholku/purejavacomm. Pty4j depends on the forked version of PureJavaComm (org.jetbrains.pty4j:purejavacomm).

Windows pty implementation used here is the magnificent WinPty library written by Ryan Prichard: https://github.com/rprichard/winpty

Adding Pty4J to your build

The releases are published to Maven Central: org.jetbrains.pty4j:pty4j.

Maven

<dependency>
  <groupId>org.jetbrains.pty4j</groupId>
  <artifactId>pty4j</artifactId>
  <version>0.12.13</version>
</dependency>

Gradle

dependencies {
  implementation 'org.jetbrains.pty4j:pty4j:0.12.13'
}

Usage

Using this library is relatively easy:

String[] cmd = { "/bin/sh", "-l" };
Map<String, String> env = new HashMap<>(System.getenv());
env.put("TERM", "xterm");
PtyProcess process = new PtyProcessBuilder().setCommand(cmd).setEnvironment(env).start();

OutputStream os = process.getOutputStream();
InputStream is = process.getInputStream();

// ... work with the streams ...

// wait until the PTY child process is terminated
int result = process.waitFor();

The operating systems currently supported by pty4j are: Linux, OSX, Windows and FreeBSD.

License

The code in this library is licensed under Eclipse Public License, version 1.0 and can be found online at: http://www.eclipse.org/legal/epl-v10.html.

pty4j's People

Contributors

andreyakinshin avatar cheungxi avatar dmpanov avatar epeshk avatar fkistner avatar fornever avatar gaudima avatar gharrma avatar jackbentley avatar nd avatar pchel- avatar rhwood avatar rprichard avatar samwot avatar satsen avatar segrey avatar shawnanastasio avatar stigger avatar trespasserw avatar turbanoff avatar vladrassokhin avatar wangling12 avatar yole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pty4j's Issues

Not working great with mac osx zsh

With xterm.js frontend and pty4j backend and zsh being the shell "Delete" key press is not deleting chars but rather prints something.

no lib folder

the build.gradle and README.md speak about a lib folder containing a purejavacomm.jar dependency, but it isn't in the repository

Broken link in readme

This link: The releases are uploaded to org.jetbrains.pty4j:pty4j.

It appears JFrog stopped hosting bintray, so releases cannot be retrieved from there at the moment

Recommended compiler and linker flags for GCC when building native library

libpty.so is embedded in the pty4j java library. Some security compiler and linker flags are not enabled for the Linux platform when building libpty.so, which may cause security risks

FilePath Object BIND_NOW NX PIC PIE RELRO SP NO Rpath/RunPath FS Ftrapv Strip
pty4j-0.9.4.jar_/resources/com/pty4j/native/linux/x86/libpty.so libpty.so NO YES YES UNUSED NO NO NO NO NO NO
pty4j-0.9.4.jar_/resources/com/pty4j/native/freebsd/x86/libpty.so libpty.so NO YES YES UNUSED NO NO NO NO NO NO
pty4j-0.9.4.jar_/resources/com/pty4j/native/linux/ppc64le/libpty.so libpty.so NO YES YES UNUSED YES YES NO NO NO NO
pty4j-0.9.4.jar_/resources/com/pty4j/native/freebsd/x86_64/libpty.so libpty.so NO YES YES UNUSED NO NO NO NO NO NO
pty4j-0.9.4.jar_/resources/com/pty4j/native/linux/x86_64/libpty.so libpty.so NO YES YES UNUSED NO NO NO NO NO NO

See https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/

Support armv7

The identical problem as already reported for aarch64 Support aarch64 also exists for the Raspberry Pi 4 running the currently official 32 bit Raspberry Pi OS.

It would be great if there will be also a library shipped that works with ARMv7.

The instructions to compile the shared library works.
Currently the library needs to be copied to the x86 directory to get it used.

publish to maven central ?

I dont see pty4j is published to maven central. Can we plz do it, so it can be used easily with maven/gradle etc

Performance issues when initiating a new PTY on systems with high FD limits

When running on a system with a very high file descriptor limit, the library will take extreme amounts of time to initialize a new PTY properly. The culprit appears to be the following block of code:

pty4j/native/exec_pty.c

Lines 125 to 131 in 7bcaeb6

{
int fdlimit = sysconf(_SC_OPEN_MAX);
int fd = 3;
while (fd < fdlimit)
close(fd++);
}

A better solution on machines with the /proc filesystem available would be to perhaps try only closing file descriptors that are actually open?

java.lang.UnsatisfiedLinkError: Native library

The computer my school gave us is loongarch, but I am used to using clion, but using clion on loongarch cannot debug, which makes me very distressed, every time I debug, it will prompt "java.lang.UnsatisfiedLinkError: Native library (com /sun/jna/linux-loongarch64/libjnidispatch.so)" I searched the Internet and the problem is in pty4j, but I don't know how to do it, do you tell me, or you coud add loongarch support

Could not initialize class com.pty4j.unix.PtyHelpers

Hello there,
I'm using CLion 1.2 on FreeBSD 10.2 amd64.
The problem is when I want to debug a program, it will raise an error which says:
Could not initialize class com.pty4j.unix.PtyHelpers

and debugging will stop ..

Release version

Pty4j currently only has a tag of 0.9.4, but pty4J-Java is currently updated to version 0.12.5, which can seem confusing. Is there a plan to manage this version number uniformly

Can not build project

that's terrible

your dependencies jar purejavacomm
he disappeared into this world
XD

mvn clean package

[INFO] Scanning for projects...
[INFO]
[INFO] ----------< StreamingPlatform >-----------
[INFO] Building StreamingPlatform
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.jetbrains.pty4j:purejavacomm:jar:0.0.11.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.048 s
[INFO] Finished at: 2022-11-29T16:36:58+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project StreamingPlatform: Could not resolve dependencies for project StreamingPlatform:jar:20221129-216: Failure to find org.jetbrains.pty4j:purejavacomm:jar:0.0.11.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Implement available() method for input streams

Input streams (both windows and unix) do not provide correct available() implementation. This prevents from using InputStreamReader.ready() to correct read from streams in non-blocking manner.

Stall when command is not found

I copied the example in the README.md and when I would try run it, it would just stall forever on waitFor(). The code is in xtend, which is a java dialect

// The command to run in a PTY...
val cmd = #["/bin/sh", "-l" ]
val env = #{"TERM" -> "xterm"}

val pty = PtyProcess.exec(cmd, env);

val os = pty.getOutputStream()
val is = pty.getInputStream()

new Thread[
	new BufferedReader(new InputStreamReader(is)).lines().forEach[println(it)]
].start()
new Thread[
	new BufferedReader(new InputStreamReader(pty.getErrorStream())).lines().forEach[System.err.println(it)]
].start()

println("Waiting")
// wait until the PTY child process terminates...
val result = pty.waitFor();

// free up resources.
pty.destroy();
println(result)

The logs aren't particularly useful

2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 93 │ Found /tmp/pty4j-linux-x86_64-8391184450079375244 in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 98 │ Listed files in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 109 │ Checked upToDate in 0 ms
2018-11-01 10:59:44,262 [DEBUG ] ExtractedNative 116 │ Cleared directory in 1 ms
2018-11-01 10:59:44,263 [DEBUG ] ExtractedNative 122 │ Copied [resources/com/pty4j/native/linux/x86_64/libpty.so] in 1 ms
2018-11-01 10:59:44,263 [INFO  ] ExtractedNative 126 │ Extracted pty4j native in 1 ms
waiting

So I wanted to see what the command actually does

$ /bin/sh -l                                                                                                                                              sirolf2009 <[email protected]> sort timeseries 
/bin/sh: 25: source: not found
$ ^C
$ exit
$

I get a source not found, and then a subshell. Which is probably why I was stalling, the subshell was waiting for input. So shouldn't I have seen /bin/sh: 25: source: not found in my console?

Details:
Pty4j v0.8.5

$ uname -a                                                                                                                              
Linux northpool2 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux

Java VM crashes using mutliple instances on 64-bit environment

Hello,

I don't know if this is the fault of pty4j or the underlying winpty or even my own. So I have a java application that opens multiple terminals using JediTerm. When I open the second Terminal on a 64-bit Java environment I get the following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000776e32d0, pid=2076, tid=4092
#
# JRE version: 7.0_13-b20
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [ntdll.dll+0x532d0]  RtlFreeHeap+0xd0
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\...\hs_err_pid2076.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

This happens on every 64-bit java version as far as I have seen. When I use a 32-bit java version every thing works as expected.

I also got the following exception thrown:

Exception in thread "AWT-EventQueue-0" java.lang.Error: Invalid memory access
        at com.sun.jna.Native.invokeInt(Native Method)
        at com.sun.jna.Function.invoke(Function.java:383)
        at com.sun.jna.Function.invoke(Function.java:315)
        at com.sun.jna.Library$Handler.invoke(Library.java:212)
        at com.pty4j.windows.$Proxy1.winpty_start_process(Unknown Source)
        at com.pty4j.windows.WinPty.<init>(WinPty.java:45)
        at com.pty4j.windows.WinPtyProcess.<init>(WinPtyProcess.java:37)
        at com.pty4j.PtyProcess.exec(PtyProcess.java:77)
        at com.pty4j.PtyProcess.exec(PtyProcess.java:50)

Edit: I tested this behaviour now by just starting the class PtyMain from jediterm which reproduces the issue.

pty4j hangs on Windows

On Windows, I can hang jediterm and IntelliJ's terminal by running dir /s c:\, then mashing the keyboard for 5-60 seconds while the directory listing spews. Eventually, the directory listing halts, and
nothing I do can unfreeze it. I can observe that keypresses are still getting through to the winpty agent (by setting WINPTYDBG=1 and running winpty-debugserver.exe). From my debugging, it looks like the Java VM gets stuck in this loop:

while (writeNotify) {
}//wait for write to finish

Nonetheless, I can see that writeNotify is being set to false. writeNotify isn't volatile, so I think Java is allowed to factor out the read, turning the code into this:

if (writeNotify) {
    while (true) {}
}

I've only hit this hang so far in a Windows VM. I'm using a 4-core 32-bit Windows 7 VM running on a 4-core 64-bit Linux host. When I reboot into 64-bit Windows 7 natively, I can't reproduce the hang.

I fixed this issue by rewriting NamedPipe.

GFX processes running in pty4j on Windows appear behind existing windows

I'm using pty4j in my Java servlet to run a Python interpreter. The servlet uses a websocket to communicate with xterm.js running in a browser on Windows. The whole thing works really well, except..

If I run a eg. Python turtle program, The Python window appears behind the browser. I'm guessing the fact the WinPTY console is hidden isn't helping.

Have you come across this sort of thing and do you know of a workaround?

Thx, Clive

Pty4J has no support for OS NetBSD

When I run CLion 2019.3 on NetBSD, the following message appears on stderr:

Caused by: java.lang.RuntimeException: Pty4J has no support for OS NetBSD

Since NetBSD is quite similar to OpenBSD and FreeBSD, it should be simple to port Pty4J to NetBSD as well.

To install NetBSD in a VirtualBox, you can download the ISO file.
To install CLion on NetBSD, just extract the Linux archive and run it.
For example, I am running NetBSD headless and connect via ssh and Xming.

AIX Support

We are looking to use pty4j on AIX. There is a legacy program that we want to call from the Java and this legacy program is currently writing and reading from terminals. What kind of help/support we can get from you on this. We are willing to put money for the extra work needed, to compile this on AIX and run it on the AIX.

"Assertition failed" in windows

Hi,

I get the following "Assertition failed" exception using pty4j in windows, as mentioned in:

microsoft/vscode#35117

It seems to have been fixed in vscode more than 5 years ago, still the issue is present in pty4j 0.12.7

Is it possible to publish a new artifact with a dll which has the fix included?

Thanks

Issue in `pty.waitFor() `

Hi, I am not sure whether process.waitFor() in a web application is necessary.

In Pty4j official example, it shows wait until the PTY child process terminates.... This code maybe only works in a none web application, it will exit after executing ,so they need to block the thread for input/output action. But in a web application, it is self blocked, so I am not sure whether process.waitFor() in a web application is necessary.

Building Native Library on OpenBSD Linker Errors

I am attempting to build the native .so lib file for OpenBSD to use with CLion for debugging, I downloaded the zip archive of pty4j, unzipped, then went into the native/ directory. I realized there is a Makefile_openbsd, so I renamed Makefile_openbsd to Makefile and ran make, but then I got this linker error for functions defined in libc:

open$ make
mkdir -p ../os/openbsd/x86
cc -m32 -g -shared -Wl,-soname,libpty.so  -o ../os/openbsd/x86/libpty.so exec_pty_x86.o openpty_x86.o pfind_x86.o
/usr/bin/ld: warning: i386 architecture of input file `exec_pty_x86.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `openpty_x86.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `pfind_x86.o' is incompatible with i386:x86-64 output
exec_pty_x86.o: In function `restore_signal':
exec_pty.c:(.text+0x60): undefined reference to `memset'
exec_pty.c:(.text+0x7b): undefined reference to `sigemptyset'
exec_pty.c:(.text+0xac): undefined reference to `sigaction'
exec_pty.c:(.text+0xc5): undefined reference to `__errno'
exec_pty.c:(.text+0xd3): undefined reference to `strerror'
exec_pty.c:(.text+0xdd): undefined reference to `__sF'
exec_pty.c:(.text+0x11c): undefined reference to `fprintf'
exec_pty.c:(.text+0x156): undefined reference to `__stack_smash_handler'
exec_pty_x86.o: In function `exec_pty':
exec_pty.c:(.text+0x283): undefined reference to `__sF'
exec_pty.c:(.text+0x2a1): undefined reference to `fprintf'
exec_pty.c:(.text+0x2b8): undefined reference to `fork'
exec_pty.c:(.text+0x2cd): undefined reference to `__errno'
exec_pty.c:(.text+0x2da): undefined reference to `strerror'
exec_pty.c:(.text+0x2e3): undefined reference to `__sF'
exec_pty.c:(.text+0x319): undefined reference to `fprintf'
exec_pty.c:(.text+0x32a): undefined reference to `free'
exec_pty.c:(.text+0x34e): undefined reference to `chdir'
exec_pty.c:(.text+0x363): undefined reference to `setsid'
exec_pty.c:(.text+0x383): undefined reference to `perror'
exec_pty.c:(.text+0x3c9): undefined reference to `__errno'
exec_pty.c:(.text+0x3d6): undefined reference to `strerror'
exec_pty.c:(.text+0x3df): undefined reference to `__sF'
exec_pty.c:(.text+0x415): undefined reference to `fprintf'
exec_pty.c:(.text+0x465): undefined reference to `__errno'
exec_pty.c:(.text+0x472): undefined reference to `strerror'
exec_pty.c:(.text+0x47b): undefined reference to `__sF'
exec_pty.c:(.text+0x4b1): undefined reference to `fprintf'
exec_pty.c:(.text+0x4d6): undefined reference to `close'
exec_pty.c:(.text+0x4f4): undefined reference to `close'
exec_pty.c:(.text+0x51a): undefined reference to `getpid'
exec_pty.c:(.text+0x528): undefined reference to `getpid'
exec_pty.c:(.text+0x53d): undefined reference to `setpgid'
exec_pty.c:(.text+0x55d): undefined reference to `perror'
exec_pty.c:(.text+0x58c): undefined reference to `dup2'
exec_pty.c:(.text+0x5b3): undefined reference to `dup2'
exec_pty.c:(.text+0x5fe): undefined reference to `dup2'
exec_pty.c:(.text+0x612): undefined reference to `close'
exec_pty.c:(.text+0x630): undefined reference to `close'
exec_pty.c:(.text+0x650): undefined reference to `sysconf'
exec_pty.c:(.text+0x67c): undefined reference to `close'
exec_pty.c:(.text+0x6ab): undefined reference to `execve'
exec_pty.c:(.text+0x6cb): undefined reference to `_exit'
exec_pty.c:(.text+0x6fb): undefined reference to `free'
exec_pty.c:(.text+0x71e): undefined reference to `free'
openpty_x86.o: In function `set_noecho':
openpty.c:(.text+0x41): undefined reference to `tcgetattr'
openpty.c:(.text+0x8d): undefined reference to `tcsetattr'
openpty.c:(.text+0xc6): undefined reference to `__stack_smash_handler'
openpty_x86.o: In function `ptys_open':
openpty.c:(.text+0x11a): undefined reference to `open'
openpty.c:(.text+0x135): undefined reference to `close'
openpty.c:(.text+0x179): undefined reference to `ioctl'
pfind_x86.o: In function `path_val':
pfind.c:(.text+0x47): undefined reference to `getenv'
pfind.c:(.text+0xa0): undefined reference to `strncmp'
pfind_x86.o: In function `pfind':
pfind.c:(.text+0x12b): undefined reference to `__sF'
pfind.c:(.text+0x149): undefined reference to `fprintf'
pfind.c:(.text+0x1a0): undefined reference to `access'
pfind.c:(.text+0x1ba): undefined reference to `strdup'
pfind.c:(.text+0x20d): undefined reference to `strlen'
pfind.c:(.text+0x222): undefined reference to `__sF'
pfind.c:(.text+0x240): undefined reference to `fprintf'
pfind.c:(.text+0x269): undefined reference to `strdup'
pfind.c:(.text+0x297): undefined reference to `strtok_r'
pfind.c:(.text+0x2ee): undefined reference to `snprintf'
pfind.c:(.text+0x31b): undefined reference to `access'
pfind.c:(.text+0x338): undefined reference to `free'
pfind.c:(.text+0x34c): undefined reference to `strdup'
pfind.c:(.text+0x387): undefined reference to `strtok_r'
pfind.c:(.text+0x3a6): undefined reference to `free'
pfind.c:(.text+0x3fe): undefined reference to `__stack_smash_handler'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in /home/michael/Downloads/pty4j-master/native (Makefile_linux:57 '../os/linux/x86/libpty.so')

How would I get around that to build the full .so file?

  • Thanks!

Consider providing easy way to override argv[0]

Thanks

First, and foremost, thanks for pty4j, it is a very useful lib!

Disclaimer

My understanding is just that and could be wrong.
I am happy to learn if/where I've gone astray.

Use Case

I am contributing to an experimental open-source terminal that uses pty4j.

On macOS, due to the way Apple implemented shell initialization, it seems it is best practice to launch the shell for a terminal as a login shell.
This can be done via:

  1. specifying an -l or --login option to bash
  2. overriding argv[0] with a - prefix. For example, launching /bin/bash results in overriding argv[0] from /bin/bash to -bash.

We looked at kitty, alacritty, iTerm2 and contour. They all picked option 2.
So we'd like to do the same.

Issue

While I do see pty4j has an exec method in com.pty4j.unix.PtyHelpers that looks like it would allow me to override argv[0] via its argv parameter, using it directly seems to mean I would lose the benefits of com.pty4j.unix.UnixPtyProcess.

Proposal

Make it easier to override argv[0].

Here are some initial ideas:

  1. For me, ideally, this would be via a new option in one/more of the exec methods in com.pty4j.PtyProcess. Perhaps something named argv0Override? I don't think this is valid for Windows, so on that OS, if specified, it could be ignored (or throw, whatever makes sense).
  2. Another alternative that might be workable is making exec in com/pty4j.unix.UnixPtyProcess public and override-able. This, I think, would allow me to replace exec behaviour to do my argv[0] override bidding.
  3. ?? Does anyone else see another good option I am missing?

Next steps

If this makes sense and is of interest, I could take a crack at a PR after we agree on an approach.

Support aarch64

Running Intelij Community on a raspberry PI model 4 (4G) has a problem with loading pty4j and subsequently cant open terminals in the interface. This seems to be due to a lack of support for ARM 64 architecture. Intelij is fast and highly useable on Raspbian on pi4, I dont think it would be nessacary to support earlier PIs as pi4 is the first version that has suffient ram and performance to run Intelij.

CPU info is:

pi@raspberrypi:~/tmp $ more /proc/cpuinfo
processor	: 0
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 1
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 2
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 3
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 108.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

Hardware	: BCM2835
Revision	: c03111
Serial		: 10000000fade59cd
Model		: Raspberry Pi 4 Model B Rev 1.1
pi@raspberrypi:~/tmp $ 

kernel info is:

pi@raspberrypi:~/tmp $ uname -a
Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
pi@raspberrypi:~/tmp $ 

idea.log showing loading issue.

2019-12-07 10:06:56,788 [1682070]   INFO - erminal.AbstractTerminalRunner - Cannot open Local Terminal 
java.util.concurrent.ExecutionException: Failed to start [/bin/bash, --rcfile, /home/pi/bin/intelij/idea-IC-193.5233.102/plugins/terminal/jediterm-bash.in, -i] in /home/pi/IdeaProjects/ktest
	at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:197)
	at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:47)
	at org.jetbrains.plugins.terminal.AbstractTerminalRunner.lambda$openSessionInDirectory$4(AbstractTerminalRunner.java:214)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Exec_tty error:Cannot load native pty executor library
	at com.pty4j.unix.UnixPtyProcess.execInPty(UnixPtyProcess.java:272)
	at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:86)
	at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:111)
	at com.pty4j.PtyProcess.exec(PtyProcess.java:78)
	at com.pty4j.PtyProcess.exec(PtyProcess.java:49)
	at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:189)
	... 8 more
Caused by: java.lang.RuntimeException: Cannot load native pty executor library
	at com.pty4j.unix.PtyHelpers.getPtyExecutor(PtyHelpers.java:257)
	at com.pty4j.unix.PtyHelpers.execPty(PtyHelpers.java:430)
	at com.pty4j.unix.UnixPtyProcess.exec(UnixPtyProcess.java:333)
	at com.pty4j.unix.UnixPtyProcess$Reaper.execute(UnixPtyProcess.java:389)
	at com.pty4j.unix.UnixPtyProcess$Reaper.run(UnixPtyProcess.java:395)
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library '/home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so':
/home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so: cannot open shared object file: No such file or directory
/home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so: cannot open shared object file: No such file or directory
Native library (home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so) not found in resource path (/home/pi/bin/intelij/idea-IC-193.5233.102/lib/bootstrap.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/extensions.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/util.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/jdom.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/log4j.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/trove4j.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/jna.jar:/usr/lib/jvm/java-8-openjdk-armhf/lib/tools.jar)
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:302)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:455)
	at com.sun.jna.Library$Handler.<init>(Library.java:192)
	at com.sun.jna.Native.loadLibrary(Native.java:646)
	at com.sun.jna.Native.loadLibrary(Native.java:630)
	at com.pty4j.unix.NativePtyExecutor.<init>(NativePtyExecutor.java:14)
	at com.pty4j.unix.PtyHelpers$2.call(PtyHelpers.java:222)
	at com.pty4j.unix.PtyHelpers$2.call(PtyHelpers.java:218)
	at com.pty4j.util.LazyValue.getValue(LazyValue.java:25)
	at com.pty4j.unix.PtyHelpers.getPtyExecutor(PtyHelpers.java:254)
	at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:234)
	at com.pty4j.unix.Pty.ptyMasterOpen(Pty.java:140)
	at com.pty4j.unix.Pty.openMaster(Pty.java:176)
	at com.pty4j.unix.Pty.<init>(Pty.java:55)
	at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:83)
	at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:111)
	at com.pty4j.PtyProcess.exec(PtyProcess.java:78)
	at com.pty4j.PtyProcess.exec(PtyProcess.java:49)
	at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:189)
	at org.jetbrains.plugins.terminal.LocalTerminalDirectRunner.createProcess(LocalTerminalDirectRunner.java:47)
	at org.jetbrains.plugins.terminal.AbstractTerminalRunner.lambda$openSessionInDirectory$4(AbstractTerminalRunner.java:214)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: java.lang.UnsatisfiedLinkError: /home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so: cannot open shared object file: No such file or directory
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
		... 26 more
	Suppressed: java.lang.UnsatisfiedLinkError: /home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so: cannot open shared object file: No such file or directory
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
		... 26 more
	Suppressed: java.io.IOException: Native library (home/pi/bin/intelij/idea-IC-193.5233.102/lib/pty4j-native/linux/x86/libpty.so) not found in resource path (/home/pi/bin/intelij/idea-IC-193.5233.102/lib/bootstrap.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/extensions.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/util.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/jdom.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/log4j.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/trove4j.jar:/home/pi/bin/intelij/idea-IC-193.5233.102/lib/jna.jar:/usr/lib/jvm/java-8-openjdk-armhf/lib/tools.jar)
		at com.sun.jna.Native.extractFromResourcePath(Native.java:1095)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:276)
		... 26 more
2019-12-07 10:07:14,600 [1699882]   INFO - rationStore.ComponentStoreImpl - Saving Module: 'ktest.linuxMain'FacetManager took 32 ms 
2019-12-07 10:07:14,643 [1699925]   INFO - rationStore.ComponentStoreImpl - Saving Module: 'ktest.linuxTest'FacetManager took 41 ms 

Android is unsupported

When running pty4j from an android project, it throws:
Caused by: java.lang.RuntimeException: Pty4J has no support for OS Linux at com.pty4j.unix.PtyHelpers.<clinit>(PtyHelpers.java:218)

It seems to be caused by line 218 and 211 of PtyHelpers.java, in which line 211 calls Platform.isLinux() which returns false by default on android, due to android not being considered a Linux platform, which can be traced back to line 147 of Platform.java, then line 74:
if ("dalvik".equals(System.getProperty("java.vm.name").toLowerCase())) {, which sets osType to ANDROID if the application is running in Dalvik or ART.

Fail to make for OpenBSD

Hello;
as far as I can gather we have support for OpenBSD too but the release folder only supplies the freebsd.
Could you help in this matter
gradle build will result
https://scans.gradle.com/s/m56mghxdeizuy (Gradle Summery)

> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar
> Task :sourcesZip UP-TO-DATE
> Task :assemble
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources UP-TO-DATE
> Task :testClasses UP-TO-DATE

> Task :test

com.pty4j.PtyTest > testExecCat FAILED
    java.lang.NullPointerException at PtyTest.java:440

com.pty4j.PtyTest > testPromptReaderConsoleModeOff FAILED
    java.lang.NullPointerException at PtyTest.java:378

com.pty4j.PtyTest > testGetAndSetWinSize FAILED
    java.lang.NullPointerException at PtyTest.java:325

com.pty4j.PtyTest > testExecInPTY FAILED
    java.lang.NullPointerException at PtyTest.java:289

com.pty4j.PtyTest > testClosePtyTerminatesChildOk FAILED
    java.lang.NullPointerException at PtyTest.java:225

com.pty4j.PtyTest > testPromptReaderConsoleModeOn FAILED
    java.lang.NullPointerException at PtyTest.java:405

com.pty4j.PtyTest > testConsoleMode FAILED
    java.lang.NullPointerException at PtyTest.java:358

com.pty4j.PtyTest > testClosePtyForTerminatedChildOk FAILED
    java.lang.NullPointerException at PtyTest.java:161

17 tests completed, 8 failed, 4 skipped

> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/admin/OWN/pty4j/build/reports/tests/test/index.html

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':test'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
	at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
	at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
	at org.gradle.execution.plan.DefaultPlanExecutor.process(DefaultPlanExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.executeWithServices(DefaultTaskExecutionGraph.java:178)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:154)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:41)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
	at org.gradle.execution.DefaultBuildWorkExecutor.access$000(DefaultBuildWorkExecutor.java:24)
	at org.gradle.execution.DefaultBuildWorkExecutor$1.proceed(DefaultBuildWorkExecutor.java:48)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:33)
	at org.gradle.execution.IncludedBuildLifecycleBuildWorkExecutor.execute(IncludedBuildLifecycleBuildWorkExecutor.java:36)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.run(BuildOperationFiringBuildWorkerExecutor.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor.execute(BuildOperationFiringBuildWorkerExecutor.java:41)
	at org.gradle.initialization.DefaultGradleLauncher.runWork(DefaultGradleLauncher.java:236)
	at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:147)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:106)
	at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:60)
	at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:57)
	at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:85)
	at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:78)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
	at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
	at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:78)
	at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:57)
	at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
	at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:51)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
	at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
	at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
	at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
	at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
	at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:68)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:27)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
	at org.gradle.util.Swapper.swap(Swapper.java:38)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.GradleException: There were failing tests. See the report at: file:///home/admin/OWN/pty4j/build/reports/tests/test/index.html
	at org.gradle.api.tasks.testing.AbstractTestTask.handleTestFailures(AbstractTestTask.java:632)
	at org.gradle.api.tasks.testing.AbstractTestTask.executeTests(AbstractTestTask.java:501)
	at org.gradle.api.tasks.testing.Test.executeTests(Test.java:613)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:717)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:684)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:476)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:461)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:444)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:93)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:237)
	at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
	at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)
	at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
	at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
	at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
	at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
	at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208)
	at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
	at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
	at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
	at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:69)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:47)
	at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:140)
	... 128 more


* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s
6 actionable tasks: 2 executed, 4 up-to-date

Maven artifact is broken

It looks like the purejavacom artifact that pty4j depends on doesn't exist anymore

Execution failed for task ':Main.main()'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not find org.jetbrains.pty4j:purejavacomm:0.0.11.1.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/jetbrains/pty4j/purejavacomm/0.0.11.1/purejavacomm-0.0.11.1.pom
       - https://maven.pkg.github.com/ajs1998/Dag/org/jetbrains/pty4j/purejavacomm/0.0.11.1/purejavacomm-0.0.11.1.pom
     Required by:
         project : > org.jetbrains.pty4j:pty4j:0.12.7

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Not sure if this is a version bump issue or something

Consider to use purejavacomm without jetbrains flavour

Hi,
I looked at changes done in jetbrains pty4j purejavacomm 0.0.11.1 against nyholku/purejavacomm 0.0.17 (which is the version the 0.0.11.1 is based on ;-) )

If I ignore changes in the testsuite, removed unused imports, removed unused variables it seems that not a much was changed (see below).

When I look at master branch, all of them except YJPFunctionMapper and it usage are already part of it!

Please consider to change dependency to not-jetbrains-flavoured purejavacomm (if yourkit clash is not a problem anymore) to be up-to-date and get support of new jna library versions (4.x/5.x).

If there is still clash wiht yourkit profiler names, please consider to re-implement this single change on top of the lates purejavacomm release and create PR for nyholku/purejavacomm.

Using nyholku/purejavacomm will also fix #121, as purejavacomm is already in maven repository.

I did not test replace of purejavacomm yet, so it is possible that something was removed which pty4j relies on.

Details of identified changes:

purejavacomm/PureJavaSerialPort.java

Added handling PARITY_MARK and PARITY_SPACE

						break;
+++					case SerialPort.PARITY_MARK:
+++						fc |= PARENB;
+++						fc |= CMSPAR;
+++						fc |= PARODD;
+++						fi &= ~(INPCK | ISTRIP);
+++						break;
+++					case SerialPort.PARITY_SPACE:
+++						fc |= PARENB;
+++						fc |= CMSPAR;
+++						fi &= ~(INPCK | ISTRIP);
+++						break;
					default:
						throw new UnsupportedCommOperationException("parity = " + parity);
				}

jtermios/linux/JTermiosImpl.java

Added constant IGNPAR (4) and handling of name clash when using YourKitProfiler using added YJPFunctionMapper

			try {
---				Native.register("c");
+++				Native.register(NativeLibrary.getInstance("c", YJPFunctionMapper.OPTIONS));
			} catch (Exception e) {
				e.printStackTrace();
			}
...

		BRKINT = 0x00000002;
+++		IGNPAR = 0x00000004;
		PARMRK = 0x00000008;
            

jtermios/solaris/JTermiosImpl.java

Added constant IGNPAR

		BRKINT = 0x00000002;
+++		IGNPAR = 0x00000004;
		PARMRK = 0x00000008;

jtermios/JTermios.java

Added constant IGNPAR

	public static int BRKINT = 0x00000002;
+++	public static int IGNPAR = 0x00000004;
	public static int PARMRK = 0x00000008;

Added termios/YJPFunctionMapper.java

@@ -0,0 +1,36 @@
package jtermios;

import com.sun.jna.FunctionMapper;
import com.sun.jna.Library;
import com.sun.jna.NativeLibrary;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

/**
 * FunctionMapping to strip off YourKit Profiler function prefixes.
 * Serves as a workaround to a conflict between YourKit and JNA direct calls.
 *
 * For details see: https://github.com/twall/jna/issues/236
 *
 * @author traff
 */
public class YJPFunctionMapper implements FunctionMapper {
    public final static Map OPTIONS = new HashMap();

    static {
        OPTIONS.put(Library.OPTION_FUNCTION_MAPPER, new YJPFunctionMapper());
    }

    private static final String YJP_PREFIX = "$$YJP$$";

    @Override
    public String getFunctionName(NativeLibrary nativeLibrary, Method method) {
        if (method.getName().startsWith(YJP_PREFIX)) {
            return method.getName().substring(YJP_PREFIX.length());
        } else {
            return method.getName();
        }
    }
}

Test Results while attempting to add OpenBSD support

The tests are a little unstable, sometimes they pass, sometimes they don't. I've tried both from the system terminal and from inside intellij.
Here is the summary for my last run from Intellij:

test -> 18 passed, 4 ignored
testjar -> 17 passes, 4 ignored, 1 failed (testInitialColumnsAndRows)

Is this okay for making a pull request or do all of them have to work? Also is anyone else trying to do the same at the moment?

I've made a few edits to the code that you can find here https://github.com/nicholasburn/pty4j/tree/devel
The last commit contains the binaries, the second last contains the code.

The binaries are a new version of purejavacomm (from here https://github.com/nicholasburn/purejavacomm and I've added a pull request on the main repo from which i've forked) and the libpty.so that i've compiled.

Please let me know! I would really like to get that terminal plugin to work

What module is clion's code prompt function based on

What module is clion's code prompt function based on? My computer is given by the school, it is from loogarch, I replaced jna and pty4j, now it can run and debug normally, but when writing code, there is no code prompt function, I want to know what is the reason

Question on Modifications Needed for OpenBSD Support

I'm currently in the process of try to get CLion debugging to work on OpenBSD; starting with modifying and testing JTermio/PureJavaComms to work with OpenBSD. I've noticed that pty4j has several files with JNA/Makefile that indicate some plans were made for OpenBSD, but the .so file is missing in the repository. Would adding that support simply be compiling the OpenBSD files and remaking the .jar file or is there more extensive modification that needs to be done?

  • Thanks!, Michael

Can't Get Accurate Error Messages When Ptyprocess.exec Failed

I hope to get accurate error messages instead of Unknown reason, when I execute some non-existent commands.

java.io.IOException: Exec_tty error:Unknown reason
	at com.pty4j.unix.UnixPtyProcess.execInPty(UnixPtyProcess.java:219) ~[pty4j-0.11.4.jar!/:na]
	at com.pty4j.unix.UnixPtyProcess.<init>(UnixPtyProcess.java:59) ~[pty4j-0.11.4.jar!/:na]
	at com.pty4j.PtyProcessBuilder.start(PtyProcessBuilder.java:127) ~[pty4j-0.11.4.jar!/:na]
	at com.pty4j.PtyProcess.exec(PtyProcess.java:91) ~[pty4j-0.11.4.jar!/:na]
	at com.pty4j.PtyProcess.exec(PtyProcess.java:62) ~[pty4j-0.11.4.jar!/:na]

Use SLF4J instead of Log4J

I am using pty4j in a project that uses java.util.logging (JUL) instead of Log4J (and have no option to change that). If pty4j could use SLF4J instead of Log4J, I could eliminate an entire logging layer (and library) from this project.

Using SLF4J would allow projects that use JUL, LogBack, or no logging at all to use pty4j without having to implement and manage Log4J.

Not available in Graalvm native

Not available in Graalvm native

Error: Unsupported features in 10 methods Detailed message: Error: Class initialization of com.pty4j.unix.linux.OSFacadeImpl failed. Use the option --initialize-at-run-time=com.pty4j.unix.linux.OSFacadeImpl to explicitly request delayed initialization of this class. Original exception that caused the problem: java.lang.UnsatisfiedLinkError: Unable to load library 'c': 找不到指定的模块。 找不到指定的模块。 找不到指定的模块。 Native library (win32-x86-64/c.dll) not found in resource path ([file:/D:/study/demo1/target/demo1-1.0-SNAPSHOT-native-image-source-jar/demo1-1.0-SNAPSHOT-runner.jar, file:/D:/study/demo1/target/demo1-1.0-SNAPSHOT-native-image-source-jar/, file:/C:/Users/NINGMEI/.jdks/graalvm-ce-java17-22.1.0/lib/svm/library-support.jar]) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:301) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:461) at com.sun.jna.Library$Handler.<init>(Library.java:192) at com.sun.jna.Native.loadLibrary(Native.java:646) at com.sun.jna.Native.loadLibrary(Native.java:630) at com.pty4j.unix.linux.OSFacadeImpl.<clinit>(OSFacadeImpl.java:77) at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:183) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:653) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:136) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.shouldInitializeAtRuntime(ConfigurableClassInitialization.java:164) at com.oracle.svm.hosted.SVMHost.isInitialized(SVMHost.java:286) at com.oracle.graal.pointsto.meta.AnalysisType.isInitialized(AnalysisType.java:728) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.maybeEagerlyInitialize(BytecodeParser.java:4258) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4456) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4445) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4440) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5221) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3358) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3318) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3163) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138) at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030) at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84) at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:79) at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49) at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:236) at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42) at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38) at com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:135) at com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:586) at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:166) at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357) at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:301) at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:290) at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:111) at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:388) at com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:631) at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193) at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Suppressed: java.lang.UnsatisfiedLinkError: 找不到指定的模块。 at com.sun.jna.Native.open(Native Method) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191) ... 46 more Suppressed: java.lang.UnsatisfiedLinkError: 找不到指定的模块。 at com.sun.jna.Native.open(Native Method) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204) ... 46 more Suppressed: java.lang.UnsatisfiedLinkError: 找不到指定的模块。 at com.sun.jna.Native.open(Native Method) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:264) ... 46 more Suppressed: java.io.IOException: Native library (win32-x86-64/c.dll) not found in resource path ([file:/D:/study/demo1/target/demo1-1.0-SNAPSHOT-native-image-source-jar/demo1-1.0-SNAPSHOT-runner.jar, file:/D:/study/demo1/target/demo1-1.0-SNAPSHOT-native-image-source-jar/, file:/C:/Users/NINGMEI/.jdks/graalvm-ce-java17-22.1.0/lib/svm/library-support.jar]) at com.sun.jna.Native.extractFromResourcePath(Native.java:1119) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:275) ... 46 more

ppc64le binaries out of date

It seems the linux/ppc64le binaries haven't been rebuilt in a while and as a result pty4j no longer functions on the platform:

2021-05-14 13:25:43,008 [ 151904]  ERROR - plication.impl.ApplicationImpl - Error looking up function 'set_window_size': /home/shawnanastasio/Downloads/clion-2020.2.1/lib/pty4j-native/linux/ppc64le/libpty.so: undefined symbol: set_window_size 
java.lang.UnsatisfiedLinkError: Error looking up function 'set_window_size': /home/shawnanastasio/Downloads/clion-2020.2.1/lib/pty4j-native/linux/ppc64le/libpty.so: undefined symbol: set_window_size

PtyUtil.ENV_PTY_LIB_FOLDER is only settable using OS environment variable

The only way to specify the PtyUtil.ENV_PTY_LIB_FOLDER value is using the PTY_LIB_FOLDER environment variable. The problem with this is that it needs to be specified by the user external to the application. Furthermore, "it would be nice" if the PtyUtil.ENV_PTY_LIB_FOLDER could be specified programmatically before the PtyProcess class is utilized. A potential solution would be to add a PtyUtil.setPtyLibFolderPath( String ) method that can be used to initialize the PtyUtil.ENV_PTY_LIB_FOLDER. This would require, however, that PtyUtil.ENV_PTY_LIB_FOLDER not be final.

GDB Remote Debugging failing with PTY Process Builder

We are creating process from PTY Process Builder, with in the same process we are trying the attach gdb launch configuration programmatically . it is failing with "exec_pty(92): returning due to error: Bad file descriptor"

Above Error is coming for while executing below command:
gdb --interpreter mi2 --nx -q --interpreter console -ex new-ui mi /dev/pts/41 -ex set pagination off -ex show version

Mainly it is failing with -ex new-ui mi /dev/pts/41 with this process created from pty4j process builder. do we have any work around or solution to overcome this.
This is happening with gdb 9.2 version
Advance thanks for your support.

Package native libraries into jar

`
Can you package the native libraries into the pty4j.jar file, so that it can be more easy to deploy.
I did a prototype that works on my OSX, I need to use lipo from Xcode to package x86 and x86_64 version of libpty.dylib into a multiarch library because looks like jna-platform require a multiarch library if you want package it into jar file.

diff --git a/src/com/pty4j/unix/PtyHelpers.java b/src/com/pty4j/unix/PtyHelpers.java
index 9d85fd6..cb10583 100644
--- a/src/com/pty4j/unix/PtyHelpers.java
+++ b/src/com/pty4j/unix/PtyHelpers.java
@@ -221,9 +221,7 @@ public class PtyHelpers {

static {
try {

  •  File lib = PtyUtil.resolveNativeLibrary();
    
  •  myPtyExecutor = new NativePtyExecutor(lib.getAbsolutePath());
    
  •  myPtyExecutor = new NativePtyExecutor("pty");
    
    }
    catch (Exception e) {
    LOG.error("Can't load native pty executor library", e);
    `

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.