Hi all,
   I ran into a possible problem in readline developing a library for Rake
to aid in managing and launching processes.

basically, if you use (ruby) Process.spawn or other ways to launch a
subprocess that don't detach and that process inherits the stdin default
pipe of the parent, the terminal input gets corrupted before hitting the
child process (if that child is using readline).

my reproduction for any ruby version:
```

$ irb
1.9.3-p551 :001 > Process.spawn('ruby -e "puts :first; require
\'pry\'; binding.pry; puts :second"')
 => 62083
[1] pry(main)> ui first
NameError: undefined local variable or method `ui' for main:Object
[4] pry(main)> ui<main>'
NameError: undefined local variable or method `ui' for main:Object
from (pry):2:in `<main>'
[5] pry(main)> ^C
[5] pry(main)> qi
NameError: undefined local variable or method `qi' for main:Object

```
the above is me trying to type "quit" into pry and it getting corrupted.
if i slowly and deliberately type qquuiitt<esc><enter> i can sometimes get
it to quit.  it appears the nested readline instances may be sharing memory
or similar.

i've seen this in both readline 6.3 and 7.0 on osx 10.11 and in redhat7

if i force osx or rhel7 to install and use rb-readline or editline the
issue goes away.

It appears others have seen this issue as well:
https://github.com/pry/pry/issues/1275
i also saw a bug report on this with byebug but i can't find it.


i'm not clear if this is a feature i need to work around, or if it's a bug.

thanks!

-- 
eric thompson                                      qa
(hc)erict             (t)@er0ck             (gh)er0ck

¤-■-¤ puppet:                           The shortest path to better
software.
PuppetConf 2017 <https://puppet.com/puppetconf>, 10-12 October
San Francisco, California
Save $328, register by 30 June w/ early adopter discount
_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to