Project

General

Profile

Actions

Bug #14198

closed

Error forwarding standard input to subprocess

Added by betabandido (Victor Jimenez) over 6 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
[ruby-core:84334]

Description

I am developing a wrapper for Terraform (https://www.terraform.io/), which at some point during its execution, it may request user input. So, my application must forward everything typed on its stdin to the subprocess' stdin. The following solution works on Linux, but on Windows the subprocess (Terraform) seems to never receive the input.

A similar approach works for wrappers implemented in Python or Go, so I believe this may actually be a bug in Ruby itself.

The file test.rb contains the code to reproduce the issue. First, Terraform is downloaded in the working directory. Then, popen3 is used to run Terraform.


Files

Gemfile (46 Bytes) Gemfile betabandido (Victor Jimenez), 12/18/2017 01:29 PM
test.rb (1.27 KB) test.rb betabandido (Victor Jimenez), 12/18/2017 01:29 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0