Repository navigation
nohup: move the C.dup2 call behind a .c.v wrapper - #252
Merged
Merged
Conversation
V no longer permits a C call directly in a pure .v file, so src/nohup/nohup.v calling C.dup2 at line 73 fails the prod build with 'C code will not be allowed in pure .v files'. The declaration already lived in nohup.c.v, so this adds a wrapper there and calls that instead, which is the boundary the compiler now expects. This is why ubuntu-prod-build has been red, and it is unrelated to the PR that surfaced it: nohup has been building only because the local compiler is older than the one CI builds from master, and that difference is worth stating because a build that fails only on the newer compiler looks exactly like a regression in the change under review. Verified on linux, macos, vinix and windows, and the runtime behaviour of nohup is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V no longer permits a C call directly in a pure
.vfile, sosrc/nohup/nohup.vcallingC.dup2at line 73 fails the prod build withC code will not be allowed in pure .v files, please move it to a .c.v file instead.The declaration already lived in
nohup.c.v, so this adds a wrapper there and calls that instead — the boundary the compiler now expects.This is why
ubuntu-prod-buildhas been red. It is unrelated to PR #237, which is where it surfaced:nohuphas been building only because my local compiler is older than the one CI builds frommaster, and that difference is worth stating plainly, because a build that fails only on the newer compiler looks exactly like a regression in whatever change is under review.Verified on linux, macos, vinix and windows. Runtime behaviour of
nohupis unchanged — I built the pre-change binary fromupstream/mainand confirmed both versions panic identically onnohup --version, so the panic is pre-existing and not something this introduces.