Skip to content

process :inherit semantics #88

Answered by borkdude
ikappaki asked this question in Q&A
Discussion options

You must be logged in to vote

You can write to *out* and *err* using:

(process [...] {:out *out* :err *err*})

This is not the default because there is buffering overhead when you write to those.

The defaults are chosen like they are now so you can compose process:

$ bb -e "(require '[babashka.process :refer [process]]) (-> (process \"ls\") (process \"cat\" {:out :string}) deref :out)"

There are always trade-offs and no one default will make everybody happy.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ikappaki
Comment options

@borkdude
Comment options

@ikappaki
Comment options

Answer selected by ikappaki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #86 on October 01, 2022 16:43.