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

Implement get_length() for pipes. #102365

Merged
merged 1 commit into from
Feb 3, 2025
Merged

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Feb 3, 2025

  • Fixes get_line() getting stick if used with the pipes.
  • Add implementation of get_length for Windows and Unix pipes, allows checking for available input buffer bytes:
if pipe["stdio"].is_open():
	var sz = pipe["stdio"].get_length()
	if sz > 0:
		var buffer = pipe["stdio"].get_buffer(sz)
		$TextEdit.text += buffer.get_string_from_utf8()

Fixes #102340

@Repiteo Repiteo merged commit ccc306a into godotengine:master Feb 3, 2025
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 3, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OS.execute_with_pipe is very buggy
4 participants