Spawned procs should inherit goreman's stdin#140
Conversation
What happen for this? It is not guaranteed which one will be called first? |
|
Yep, there are no guarantees, the point is not to guarantee which tool gets to read from stdin the point is to 1. match how foreman works, 2. provide for tools that expect to be run via a tty. |
|
My example was to demonstrate that the processes foreman starts inherit foreman's stdin, not to enable some kind of specific ordering of stdin behavior. |
|
Is it a specification that foreman handles standard input? If so, please show me the specification or the source code that intentionally implements it. I can't implement it without specification. |
|
Here's the code: https://github.com/ddollar/foreman/blob/1445adc429d79b5b3dd1d54cf9dcb75d253c924f/lib/foreman/process.rb#L54 Foreman uses Since the docs for Tada! Proof that foreman spawns processes such that they all inherit stdin from the main foreman process. I've also demonstrated that this matters to some processes. |
|
is this going forward ? stdin is really useful feature. I guess you would all agree. |
Processes spawned via
foremaninherit stdin from it. You can test this like so:Why does this matter? Because some things care if stdin is a TTY or
/dev/null(the previous stdin value for all launched procs):You could always redirect
/dev/nullinto your processes if that's what you want but forcing them to inherit your terminal's TTY is impossible if goreman is inserting/dev/nullas stdin and so I think this is the better default.Thoughts?