[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84342] [Ruby trunk Bug#14198] Error forwarding standard input to subprocess
From:
nobu@...
Date:
2017-12-19 00:12:50 UTC
List:
ruby-core #84342
Issue #14198 has been updated by nobu (Nobuyoshi Nakada). `system` also accepts redirections. And child processes inherit STDIN/STDOUT/STDERR from their parent process by the default, you don't need such arguments at all usually. If you want to capture the outputs and the errors, `IO.popen(%w'terraform destroy', err: [:child, :out], &:read)`. ---------------------------------------- Bug #14198: Error forwarding standard input to subprocess https://bugs.ruby-lang.org/issues/14198#change-68513 * Author: betabandido (Victor Jimenez) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- 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) test.rb (1.27 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>