eventmachine/eventmachine — pull request #453 by genki (2013-07-23 08:01:40+00:00)
Title: Added EM::Connection#close_write

EM.popen needs to half-close the duplex descripter so that the subprocess can detect EOF.

Here is typical use case:

```ruby
EM.run do
EM.popen "cat", (Module.new do
define_method :post_init do
send_data "hello\n"
EM.next_tick{close_write}
end
define_method :receive_data do |data|
puts data
end
define_method(:unbind){EM.stop}
end)
end
```