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

Fix O_CLOEXEC tests when compiling to bytecode #732

Merged
merged 4 commits into from
Oct 6, 2019
Merged

Conversation

aantron
Copy link
Collaborator

@aantron aantron commented Oct 6, 2019

@olafhering, could you test this branch, openfile-tests, to see if it fixes #729 for you?

The problem was caused by this line:

Unix.execv Sys.argv.(0) [||]

which does not pass a program name to the child process. When the child process was a native-code OCaml program, it did not try to access that first argument. But, when the child is a bytecode copy of the tester, the bytecode runtime fails if the first argument is not present. It seems to work fine with the empty string as argument, however.

I added a Travis row for testing on a bytecode-only compiler.

Fixes #729.

@aantron aantron added this to the 4.3.2 milestone Oct 6, 2019
@aantron aantron changed the title Fix O_CLOEXEC tests Fix O_CLOEXEC tests when compiling to bytecode Oct 6, 2019
@olafhering
Copy link
Contributor

@olafhering, could you test this branch, openfile-tests, to see if it fixes #729 for you?

Yes, it does. Thanks!

@aantron aantron merged commit 18e990e into master Oct 6, 2019
@aantron aantron deleted the openfile-tests branch October 6, 2019 22:46
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 this pull request may close these issues.

test fail in lwt_unix
2 participants