process
process copied to clipboard
`pb {:in "foo"}` hangs
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.
@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.
I see. Thanks. I've replaced my use with babashka.process/process.