Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flock does not work on AIX #118

Closed
Taywee opened this issue May 17, 2018 · 0 comments · Fixed by #117
Closed

flock does not work on AIX #118

Taywee opened this issue May 17, 2018 · 0 comments · Fixed by #117

Comments

@Taywee
Copy link
Contributor

Taywee commented May 17, 2018

flock doesn't work on AIX because it doesn't actually reside in libc, but instead in libbsd. flock is necessary for full functionality of jruby, though. Some obvious solutions:

  1. Create an interface to libbsd, load it in, and call flock there instead.
  2. Override flock in the AIX interface, and translate arguments and call either lockf or fcntl with the equivalent arguments instead (this should work in AIX because lockf, flock, and fcntl locks are integrated and are enforced across all the APIs), essentially reimplementing flock in terms of lockf/fcntl.

I feel the latter is probably the easiest and least disruptive option, but it will require the extra struct flock type and some extra interfaces. The fcntl path is probably the easiest to avoid having to deal with things like AIX's lockf and lockf64, as well as simply being more flexible in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant