Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/util/io/PosixShim.java
Original file line number Diff line number Diff line change
@@ -173,7 +173,9 @@ public int flock(ChannelFD fd, int lockMode) {

int real_fd = fd.realFileno;

if (real_fd != -1 && real_fd < FilenoUtil.FIRST_FAKE_FD) {
if (real_fd != -1 && real_fd < FilenoUtil.FIRST_FAKE_FD && !Platform.IS_SOLARIS) {
// we have a real fd and not on Solaris...try native flocking
// see jruby/jruby#3254 and jnr/jnr-posix#60
int result = posix.flock(real_fd, lockMode);
if (result < 0) {
errno = Errno.valueOf(posix.errno());

0 comments on commit cfd7f74

Please sign in to comment.