[Tarantool-patches] [PATCH 1/5] popen: Introduce a backend engine

Cyrill Gorcunov gorcunov at gmail.com
Sat Nov 30 13:54:54 MSK 2019


On Sat, Nov 30, 2019 at 01:47:34PM +0300, Cyrill Gorcunov wrote:
> On Sat, Nov 30, 2019 at 01:04:45PM +0300, Konstantin Osipov wrote:
> > 
> > Could you provide a Lua example usage of popen() which would lead 
> > to the situation you describe here?
> > 
> > Seems like in order for that to happen the Lua script has to
> > provide both input and output streams to the called program, and
> > in this case the script should not expect that there is any
> > ordering in which the input is consumed and the output is
> > produced.
> > 
> > In any case discussing this problem would be easier if there is an
> > example.
> 
> An example is in one of my patch, here is it (result file)
> ---
...
>  $ sh -c "prompt=''; read -n 5 prompt; echo -n $prompt"

Forgot to mention that the example in previous message is
for pipe opened in blocked mode. If o_nonblock used the
script fails in "read" action. I think the main target now
for me is to investigate which mode uses python in subprocess
module and etc (simply because users are familiar with it and
will expect us to behave the same I think).


More information about the Tarantool-patches mailing list