taybenlor / runno

Sandboxed runtime for programming languages and WASI binaries. Works in the browser or on your server.
https://runno.dev
MIT License
642 stars 27 forks source link

fix hang in headlessRunFS when reading stdin #285

Closed Syuparn closed 1 year ago

Syuparn commented 1 year ago

When I run headlessRunCode with the Ruby script p readlines, it hangs up by waiting for the end of the stdin.

In runno-run, reading stdin is stopped by pressing ctrl + D and sending EOF to the runtime. On the other hand, headlessRunCode gets the whole stdin and there is no way to send EOF to the runtime.

I am not sure this is a bug or an intentional design. If it is intentional, just close this PR. Thank you.

taybenlor commented 1 year ago

Hey @Syuparn! This is definitely a bug. Thanks for filing! I'll have a look at fixing it up this week 😄

taybenlor commented 1 year ago

Oh this is a PR! lol I wasnt paying attention. Thanks for submitting it!

taybenlor commented 1 year ago

Thanks heaps! Super useful contribution.

If you don't mind me asking - what are you using Runno for?

Syuparn commented 12 months ago

@taybenlor Thank you for reviewing and merging!

I use Runno for this tool. It is a simple text editor that works with one-liner snippets. https://github.com/Syuparn/linerduper

Runno helps me to use these commands in the frontend.

taybenlor commented 12 months ago

That's so cool! Thanks for the contribution.