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

pb {:in "foo"} hangs #110

Open
dbohdan opened this issue Apr 16, 2023 · 2 comments
Open

pb {:in "foo"} hangs #110

dbohdan opened this issue Apr 16, 2023 · 2 comments

Comments

@dbohdan
Copy link

dbohdan commented Apr 16, 2023

I have run into an apparent hang when using pb in babashka on Linux. I can't determine if I am using the interface wrong or if this is a bug. Please advise.

> bb --version
babashka v1.3.176
> bb -e '(-> (babashka.process/process {:in "hi"} "cat") (babashka.process/process "cat") :out slurp)'
"hi"
> bb -e '(-> (babashka.process/pipeline (babashka.process/pb {:in :inherit} "cat") (babashka.process/pb "cat")) last :out slurp)'
^D
""
> bb -e '(-> (babashka.process/pipeline (babashka.process/pb {:in "hi"} "cat") (babashka.process/pb "cat")) last :out slurp)'

This is where babashka seems to wait forever. It does not react to ^D, only ^C.

@borkdude
Copy link
Contributor

@dbohdan This is probably a bug.

E.g. this works:

$ bb -e '(-> (babashka.process/pipeline (babashka.process/pb "echo hello") (babashka.process/pb "cat")) last deref :out slurp)'
"hello\n"

but the :in option is probably not respected with pipeline / pb.

@dbohdan
Copy link
Author

dbohdan commented Apr 16, 2023

I see. Thanks. I've replaced my use with babashka.process/process.

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

No branches or pull requests

2 participants