Skip to content

Process hangs when using -subsystem windows if you print to screen. #26481

@KingKDot

Description

@KingKDot

Describe the bug

If you try printing to the screen with this code.

fn main() {
	println("hello, world!")
	exit(0)
}

and these compiler options

v -subsystem windows -prod -cc gcc poc.v

and then you double click the exe in windows, the process will hang and be present forever until you kill it with system informer/task manager

Reproduction Steps

fn main() {
	println("hello, world!")
	exit(0)
}

and these compiler options

v -subsystem windows -prod -cc gcc poc.v

Expected Behavior

The exe would exit.

Current Behavior

The exe hangs and does not exit.

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.5.0 e2f5d6c

Environment details (OS name and version, etc.)

Windows 11 Pro
Version 10.0.26100 Build 26100

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions