Skip to content

vtimeout: rewrite#24367

Merged
spytheman merged 3 commits into
vlang:masterfrom
kbkpbot:fix-cmd-tool-vtimeout
Apr 30, 2025
Merged

vtimeout: rewrite#24367
spytheman merged 3 commits into
vlang:masterfrom
kbkpbot:fix-cmd-tool-vtimeout

Conversation

@kbkpbot

@kbkpbot kbkpbot commented Apr 30, 2025

Copy link
Copy Markdown
Contributor

Fix #24366

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22743

Comment thread cmd/tools/vtimeout.v Outdated
Co-authored-by: Delyan Angelov <delian66@gmail.com>
@kbkpbot

kbkpbot commented Apr 30, 2025

Copy link
Copy Markdown
Contributor Author

wait , it seems has problem under windows

@kbkpbot

kbkpbot commented Apr 30, 2025

Copy link
Copy Markdown
Contributor Author

Tested under Linux/Windows

Comment thread cmd/tools/vtimeout.v
p.run()
if p.err != '' {
eprintln('Cannot execute: ${ctx.cmd_args.join(' ')}')
exit(if os.exists(ctx.cmd_args[0]) { 126 } else { 127 })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have the exit code constants? It would help to clarify.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exit codes, are the ones of the timeout command in coreutils, and are unlikely to change. It is good for clarity to use comments or constants, but that can be done in another PR, while the functionality (killing the timeouted process) in this PR is desirable right away (it can simplify v reduce a bit for example).

@spytheman spytheman merged commit 6d0eaa5 into vlang:master Apr 30, 2025
@kbkpbot kbkpbot deleted the fix-cmd-tool-vtimeout branch May 31, 2025 09:10
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.

v timeout did not work as expected

3 participants