Close standard input in Gitlab::Popen.popen

This commit is contained in:
Jacob Vosmaer 2014-12-17 12:18:11 +01:00
parent 5dbbec4612
commit 52bc4e79f8
2 changed files with 4 additions and 0 deletions

View file

@ -20,6 +20,7 @@ v 7.7.0
- Add alert message in case of outdated browser (IE < 10)
-
- Added API support for sorting projects
- Close standard input in Gitlab::Popen.popen
v 7.6.0
- Fork repository to groups

View file

@ -21,6 +21,9 @@ module Gitlab
@cmd_output = ""
@cmd_status = 0
Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr|
# We are not using stdin so we should close it, in case the command we
# are running waits for input.
stdin.close
@cmd_output << stdout.read
@cmd_output << stderr.read
@cmd_status = wait_thr.value.exitstatus