Skip to content

Commit

Permalink
Try to get data to the parent container more quickly.
Browse files Browse the repository at this point in the history
I was running some code that does `yield n` every 2 seconds. If the
inmate gets `kill -9`ed, the yielded data never gets to the parent. If
the inmate gets `kill -INT`ed, the yielded data all shows up in a batch
as the inmate exits.

This is an attempt to make the data show up in the parent more quickly.
  • Loading branch information
spraints committed Sep 9, 2014
1 parent 8c20432 commit 04779e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/hoosegow
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require_relative '../lib/hoosegow'

real_stdout = $stdout.dup
real_stdout.sync = true
intercepted_stdout, intercepting_stdout = IO.pipe # returns reader,writer
$stdout.reopen(intercepting_stdout)

Expand Down

0 comments on commit 04779e4

Please sign in to comment.