Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Flush output before stopping so processes that have buffered their ou…

…tput will exit gracefully
  • Loading branch information...
commit e560605ee9fee19ad69478590ff6e5da69c89ebe 1 parent 5908786
@msassak msassak authored
Showing with 3 additions and 1 deletion.
  1. +2 −1  features/flushing.feature
  2. +1 −0  lib/aruba/process.rb
View
3  features/flushing.feature
@@ -14,10 +14,11 @@ Feature: Flushing output
When I run "ruby -e 'puts :a.to_s * 65536'"
Then the output should contain "a"
And the output should be 65536 bytes long
- # And the exit status should be 0
+ And the exit status should be 0
Scenario: Tons of interactive output
When I run "ruby -e 'len = gets.chomp; puts :a.to_s * len.to_i'" interactively
And I type "65536"
Then the output should contain "a"
And the output should be 65536 bytes long
+ # And the exit status should be 0
View
1  lib/aruba/process.rb
@@ -38,6 +38,7 @@ def stderr
def stop
if @process
+ stdout && stderr # flush output
status = @process.wait(@timeout)
status && status.exitstatus
end
Please sign in to comment.
Something went wrong with that request. Please try again.