Skip to content

nohup: move the C.dup2 call behind a .c.v wrapper - #252

Merged
JalonSolov merged 1 commit into
vlang:mainfrom
metif12:fix-c-in-pure-v
Oct 10, 2026
Merged

JalonSolov merged 1 commit into
vlang:mainfrom
metif12:fix-c-in-pure-v

Conversation

@metif12

@metif12 metif12 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

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, 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-build has been red. It is unrelated to PR #237, which is where it surfaced: nohup has been building only because my local compiler is older than the one CI builds from master, 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 nohup is unchanged — I built the pre-change binary from upstream/main and confirmed both versions panic identically on nohup --version, so the panic is pre-existing and not something this introduces.

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.
@JalonSolov
JalonSolov merged commit 17d945a into vlang:main Oct 10, 2026
0 of 4 checks passed
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.

2 participants