This functionality comes from jnr-posix, the jar file for which does not have a version number, although commit logs shows that we're using version 1.1.4.
Since the latest version of jnr-posix is 1.1.8, we should probably update our version of that jar as a first step.
It is unclear to me if we need to also update the related jffi*.jar files as well.
Adding pjenvey to seek advice.

The latest JNR libs have been added to the 2.7 branch.
Please can you try out the code on HG tip and see if that solves the problem?
If it does, we can consider updating to the latest on the 2.5 branch as well.