You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In light of #3079 I was reminded that the choices to communicate with a Process are confusing, and impossible to remember without the documentation. While an IO and false are behaving as one can expect (use the IO and close/discard the IO), the nil and true values are weird. For example input: true to create an IO object to allow me to communicate with the child process, but instead the child process will inherit STDIN from the parent! Last but not least, explicitly passing nil means that an IO object will be created... what?!
I'm proposing this breaking change:
IO: uses the given IO (no change);
true: creates an IO we can read/write to (breaking change);
false: closes IO, disabling communication (default, no change);
There is no explicit usage for nil so maybe it could mean "do nothing special", that is "inherit from the current process" (breaking change)?
The text was updated successfully, but these errors were encountered:
Right now there's an Stdio alias, but I don't think it's a good name. I don't know what a good name could be, maybe IoOption, and then we could have those names as constants inside Process so you could simply write Process::INHERIT, Process::PIPE, Process::CLOSE.
Eventually we'd like to be able to make symbol literals match enums, so we could pass :inherit, :pipe, etc.
In light of #3079 I was reminded that the choices to communicate with a Process are confusing, and impossible to remember without the documentation. While an
IO
andfalse
are behaving as one can expect (use the IO and close/discard the IO), thenil
andtrue
values are weird. For exampleinput: true
to create an IO object to allow me to communicate with the child process, but instead the child process will inherit STDIN from the parent! Last but not least, explicitly passingnil
means that an IO object will be created... what?!I'm proposing this breaking change:
IO
: uses the given IO (no change);true
: creates an IO we can read/write to (breaking change);false
: closes IO, disabling communication (default, no change);There is no explicit usage for
nil
so maybe it could mean "do nothing special", that is "inherit from the current process" (breaking change)?The text was updated successfully, but these errors were encountered: