You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
jSerialComm sets signals to be ignored which are reserved for the JVM risking its integrity #612
At least on Linux jSerialComm sets several signals to be ignored. This is unsupported behaviour for some signals because these are required by the JVM for their own purposes.
The current behaviour is flagged by the JVM when using the check:jni diagnostic option.
Expected behavior
jSerialComm only modifies signal handlers that are strictly necessary for its operation without interfering with other libraries or the JVM itself. If signal handlers are modified, the JVM mechanisms for doing so should be used.
Steps to reproduce
Watch signal handlers using strace or /proc//status.
Observe that once jSerialComm initializes several signal handers are set to SIG_IGN, including for example SIGUSR2.
I'm hesitant to remove the SIGUSR2 ignore handler from the library. The reason it was added in the first place was because whatever the Java VM was doing upon receipt of that signal would cause all sorts of serial port communication issues (disconnects, abnormal reads/writes, etc). Perhaps the JVM has gotten less intrusive over the years, but I'd need a lot of people to do some fairly rigorous testing with this change to ensure that it doesn't cause any new issues. Will think about how best to do this for an upcoming release.
Activity
hedgecrw commentedon Oct 31, 2025
I'm hesitant to remove the SIGUSR2 ignore handler from the library. The reason it was added in the first place was because whatever the Java VM was doing upon receipt of that signal would cause all sorts of serial port communication issues (disconnects, abnormal reads/writes, etc). Perhaps the JVM has gotten less intrusive over the years, but I'd need a lot of people to do some fairly rigorous testing with this change to ensure that it doesn't cause any new issues. Will think about how best to do this for an upcoming release.